3 quick things to check if your ASP.NET session ends before timeout

Session ending before timeout is an issue faced by many developers who use IIS 6. I have found that in most cases, this is caused when you set the recycling of worker processes using IIS manager.

Check this cool post to understand this better.

Here are 3 quick suggestions to troubleshoot this issue (assuming that you are using In-process mode - ASP.NET session state):

1. Check and see if you have configured recycling of worker processes

2. If you are maintaining cookie enabled sessions, check if the cookie is not getting deleted/modified at the client end.

3. Check to see if IIS/Application Pool is not getting restarted at regular intervals. Your application pool will restart if your global.asax or the web.config/ machine.config changes

About The Author

Suprotim Agarwal
Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for DevCurry, DotNetCurry and SQLServerCurry. He is the Chief Editor of a Developer Magazine called DNC Magazine. He has also authored two Books - 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal.

No comments: