Solved

Session loss; IIS 7

Posted on 2013-06-04
1
305 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DNS, website, godaddy 6 84
SSO via Webmail site, Exchange 2010. 1 34
URL Redirect using IIS v8 4 54
Application gets hammered - IIS 2 38
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 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