ASP.NET Web表单应用程序有时无法加载,直到删除的cookie [英] ASP.NET webforms app sometimes fails to load until cookies deleted

查看:133
本文介绍了ASP.NET Web表单应用程序有时无法加载,直到删除的cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Windows 7 PC上开发一个ASP.NET 4 web表单应用程序。我运行VS2010和IIS7.5。

I'm developing an ASP.NET 4 webforms app on my Windows 7 PC. I'm running VS2010 and IIS7.5.

我有一个奇怪的问题,其中一些页面加载(从1到任何地方20ish)后,我从IIS无响应。我甚至不能打在应用程序的BeginRequest一个断点,我就什么也得不到。但是,如果我从浏览器的开发域删除所有Cookie,网站将再次完美了几个请求加载。

I have a weird problem where after a few page loads (anywhere from 1 to 20ish) I get NO response from IIS. I can't even hit a breakpoint in Application BeginRequest, I just get nothing. But, if I delete all cookies from the browser for the development domain, the website will load perfectly again for a few more requests.

这发生在我已经安装了所有的浏览器(IE9,火狐,Chrome,Safari浏览器,Opera)的。
但是,如果我部署的应用到我们托管的服务器,一切工作正常。

This happens in all browsers I have installed (IE9, Firefox, Chrome, Safari, Opera). However, if I deploy the app to our hosted server, all works fine.

任何人都收到了这个问题?

Anyone had this issue before?

任何帮助,您可以提供非常感谢。

Many thanks for any help you can provide.

推荐答案

我添加了供参考的意见后答复。

After the comments I add for reference here an answer.

这是一个问题,当你把过大的cookie的浏览器,浏览器无法处理它们。

This is an issue when you place too large cookie to the browser and browser can not handle them.

这是在这里打球的原因,不玩有可能是因为数据的,你有它的类型和保存的cookies。

The reason that is play here, not play there maybe because of the data that you have type on it and save on cookies.

您可以搜索互联网上的cookie的限制,并为不同的浏览器。对于IE例如 http://support.microsoft.com/kb/306070

You can search for cookie limits on the internet and for different browsers. For ie for example http://support.microsoft.com/kb/306070

尽量保持饼干大小低至就可以了。

Try to keep the cookie size as low as you can.

有关参考,这里是我在web.config中更改为解决这个问题。

For reference, here is what I changed in web.config to fix this problem.

<roleManager cacheRolesInCookie="false" /> 

请注意,虽然,现在用户的角色将从数据库中的每个正需要它们时,这可能会导致性能问题读取。 (我不认为有任何性能问题,更安全的这种方式)

Note, though, that now a user's roles will be read from the database each time they're needed, which could cause a performance issue. (I am not think that there is any performance issue and is more secure this way)

这篇关于ASP.NET Web表单应用程序有时无法加载,直到删除的cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆