开发者

ASP.NET webforms app sometimes fails to load until cookies deleted

开发者 https://www.devze.com 2023-03-15 16:39 出处:网络
I\'m developing an ASP.NET 4 webforms app on my Windows 7 PC. I\'m running VS2010 and IIS7.5. I have a weird problem where after a few page loads (anywhere from 1 to 20ish) I get NO response from IIS

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

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 loa开发者_StackOverflow中文版d perfectly again for a few more requests.

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.

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

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

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.

From antmx

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号