Solved

Session loss; IIS 7

Posted on 2013-06-04
1
302 Views
Last Modified: 2013-07-01
I am having issues with session loss.  This is on a Windows 2008 r2 server with iis 7.5.  The sessions are stored 'in-proc'.

I can't reproduce the problem on demand, but it seems to occur for about 30 minutes to an hour around the same time of day when it happens (doesn't happen on the same days).  When the problem happens, the sessions can be lost in a few seconds to several minutes.

In the past I had session loss problems, but this was related to the app pool being recycled.  I fixed this issue by changing the recycling settings in IIS (I have not changed the default value in web.config).  I don't believe this problem is caused the the app pool recycling, because when the issue begins, i open task manager on the server and watch the worker process.  The PID never changes and the cpu / memory use stays within a reasonable range.

I thought the issue might be related to the anti-virus software, but the scheduled scan time is not during the time when i typically see this problem occurring.

I also checked to make sure the web.config, files in the app folders are not being changed by someone.  I check the date modified value on those files and those times don't coincide with the session loss.

Any ideas?
0
Comment
Question by:jbodager
1 Comment
 
LVL 1

Accepted Solution

by:
jbodager earned 0 total points
ID: 39290920
This link (http://blogs.msdn.com/b/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx) had two suggestions that helped me solve the problem:

1) using the performance monitor to check the application restart counter.
2) use health monitoring events to log application restarts.

After setting up the logging, I found out that the cause of the issue was an application that was creating / deleting folders on the website.  I did not realize that creating / deleting any sub-directories would cause this issue.  I thought it was only related to the ASP .NET folders.  So the fix I used was:

http://dot-net-web-developer-bristol.blogspot.com/2010/04/disabling-file-change-notification-fcn.html
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now