Solved

Session loss; IIS 7

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cookies analysis tools 2 106
PHP7 and Sql Server Windows 2008 R2 13 281
Setup IIS website to use ADFS authentication 25 232
Help to debug powershell script 5 38
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

680 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