<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx</link><description>A common, mysterious behavior encountered by ASP applications on IIS6 is the loss of session state. It seems to disappear more often and Session.Timeout seem to be ineffective. Why? Question: I have session.timout set to all day(1440 minutes). But if</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#472876</link><pubDate>Thu, 22 Sep 2005 20:29:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:472876</guid><dc:creator>John</dc:creator><description>Thanks for your detailed response however we have tried your recommendations and nothing has worked for us.&lt;br&gt;&lt;br&gt;The ASP session still seems to disappear after about 30 seconds (give or take) on our site.&lt;br&gt;&lt;br&gt;We have changed the application pool, removed all health settings, we didnt have a global.asa because we are using a mysql database, but added one in to see if that mattered.&lt;br&gt;&lt;br&gt;We setup loogging to log worker process recycling and nothing has been logged yet?&lt;br&gt;&lt;br&gt;Thanks for any help you can provide.&lt;br&gt;&lt;br&gt;Why are we losing our session?</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#473169</link><pubDate>Fri, 23 Sep 2005 08:44:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:473169</guid><dc:creator>David Wang</dc:creator><description>John - Are you saying that session state does not work at all, or that it works for a couple of requests and then suddenly stops working.&lt;br&gt;&lt;br&gt;Based on what I have said about session state, you need to look at whether you are:&lt;br&gt;1. using in-process or out-of-process session state&lt;br&gt;2. If in-process, then are your requests all to the same process or somehow different processes. For example, Web Garden would befuddle session state because requests can bounce between the various worker processes of the Web Garden, confusing in-process session state. Or is something crashing or otherwise causing w3wp.exe recycling such that state is lost&lt;br&gt;3. Is there anything in the network stripping cookies or Set-Cookie to delete session state without ASP/Browser knowing about it.&lt;br&gt;&lt;br&gt;Basically, for in-process session state, if you can show that:&lt;br&gt;1. Session state cookie is being saved and requested correctly by the browser and server&lt;br&gt;2. All requests were handled by ASP in the same process and the process is not crashing&lt;br&gt;3. But Session state is still randomly disappearing&lt;br&gt;&lt;br&gt;Then I would contact Microsoft PSS for a paid-incident support to see if there is a possible bug there.&lt;br&gt;&lt;br&gt;I am not aware of any ASP session state bugs in IIS6, but I will not discount the possibility (anything is possible with software...).&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#507211</link><pubDate>Sat, 24 Dec 2005 10:31:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:507211</guid><dc:creator>Tim</dc:creator><description>Quite a good explaination David ........&lt;br&gt;Mate just wan to know if setting out-of-process session state in IIS 6  is possible &amp;amp; how should one go about it ?&lt;br&gt;&lt;br&gt;Many thanks for your answers uptil now.  &lt;br&gt;&lt;br&gt;</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#507223</link><pubDate>Sat, 24 Dec 2005 12:25:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:507223</guid><dc:creator>David Wang</dc:creator><description>ASP does not provide Out-of-process Session State support by default. Egbert Nierop has written such an implementation, as has others.&lt;br&gt;&lt;br&gt;ASP.Net provides an Out-of-process Session State support by default.&lt;br&gt;&lt;br&gt;Here is a thread that may be of interest:&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://forums.asp.net/623999/ShowPost.aspx"&gt;http://forums.asp.net/623999/ShowPost.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#510337</link><pubDate>Sat, 07 Jan 2006 07:45:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:510337</guid><dc:creator>charlie arehart</dc:creator><description>David, your posts are wonderful (just found them, and I'm printing most of them out to learn).&lt;br&gt;&lt;br&gt;But as for the above, you make a comment (replying to someone else) that really hit the nail on the head for us, and I'm sure it must affect others. &lt;br&gt;&lt;br&gt;You said that if one were using the (default) in-process session state and enabled a web garden this &amp;quot;would befuddle session state because requests can bounce between the various worker processes of the Web Garden&amp;quot;. &lt;br&gt;&lt;br&gt;I had just determined that this was indeed out problem. I offer this post to confirm for future readers that this is a real issue. If you have code that relies on sessions, and you enable the web garden feature (set max processes to &amp;gt; 1 for an app pool), you will experience this &amp;quot;curious&amp;quot; &amp;quot;intermittent&amp;quot; loss of sessions (or &amp;quot;unexplainable logouts&amp;quot;).&lt;br&gt;&lt;br&gt;The problem isn't work process recycling, nor even application domain restarts (other problems that can kill sessions or force logouts). Instead, it's just that the web garden feature can cause your requests to eventually be directed to a new worker process where the session you had is not existing.&lt;br&gt;&lt;br&gt;Bottom line: if using sessions and you enable web gardens, you had better enable StateServer or SQLServer for session management.&lt;br&gt;&lt;br&gt;Or is there anything else you or others would propose about this conclusion. If my thoughts here help even a fraction as much as yours have, I'm happy to have shared this.&lt;br&gt;&lt;br&gt;PS It's a shame your comment feature doesn't enable us to enter our email address to be notified of any new comments. Is that something you can consider?</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#511320</link><pubDate>Tue, 10 Jan 2006 22:54:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:511320</guid><dc:creator>David Wang</dc:creator><description>Charlie - Thanks for the encouragement and information. Yes... the basic issue is that Web Garden introduces multiple processes to service requests while in-process state is not automatically copied across processes... so you either need to avoid state, manually synchronize it, or centralize and share the state in an out-of-process session state store.&lt;br&gt;&lt;br&gt;The blog software (Community Server) does have a feature for one to enter email address to be notified of any new comments. I see a &amp;quot;Receive email notifications&amp;quot; link with the blog entry, and I use it to know when there is new feedback.&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#517784</link><pubDate>Thu, 26 Jan 2006 11:45:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:517784</guid><dc:creator>David Wang</dc:creator><description>Got the link from Egbert - Out-of-process session state for ASP compatible with recycling.&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://www.nieropwebconsult.nl/asp_session_manager.htm"&gt;http://www.nieropwebconsult.nl/asp_session_manager.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#561950</link><pubDate>Mon, 27 Mar 2006 17:16:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:561950</guid><dc:creator>Alex</dc:creator><description>Is there any free Out-of-process session state for ASP available?&lt;br&gt;&lt;br&gt;Nieropwebconsult's solution is quite expensive.</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#607406</link><pubDate>Thu, 25 May 2006 23:49:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:607406</guid><dc:creator>Brian</dc:creator><description>Great information here, thank you David. I have been running around in circles for quite some time on a session problem with ASP.NET, and I wanted to point to another bit of information that I didn't find referenced in many places on the web. &lt;br&gt;&lt;br&gt;If you are losing your session and can't find any evidence of process recycling, check out this Microsoft KB article detailing a bug with MSIE 5.5 that may cause your client to break itself.&lt;br&gt;&lt;br&gt;&amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/288993/en-us&amp;quot;&amp;gt;Session"&gt;http://support.microsoft.com/kb/288993/en-us&amp;quot;&amp;gt;Session&lt;/a&gt; Data Is Lost During POST to GET Redirect&amp;lt;/a&amp;gt;</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#607699</link><pubDate>Fri, 26 May 2006 06:51:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:607699</guid><dc:creator>Brian</dc:creator><description>Link correction from above:&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/288993/en-us"&gt;http://support.microsoft.com/kb/288993/en-us&lt;/a&gt;</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#622364</link><pubDate>Thu, 08 Jun 2006 19:22:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:622364</guid><dc:creator>Tracy Davenport</dc:creator><description>We are using out of process session (state server) due to a load-balanced webfarm. &amp;nbsp;But when I turn on the webgarden we randomly loose session (2 min, 4 min, etc. when session timeout is set to 20 min). &amp;nbsp;No one else has experienced this?</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#629765</link><pubDate>Tue, 13 Jun 2006 20:22:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:629765</guid><dc:creator>Dave</dc:creator><description>I've seen people mention using SQL server to maintain state.&lt;br&gt;&lt;br&gt;Can someone elaborate on how this is done?&lt;br&gt;&lt;br&gt;Is there a COM object to do this? Is it ASP hand coded?&lt;br&gt;&lt;br&gt;Please explain.&lt;br&gt;&lt;br&gt;Thank you!</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#634440</link><pubDate>Fri, 16 Jun 2006 22:15:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:634440</guid><dc:creator>David.Wang</dc:creator><description>It's another 10K entry!&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#634447</link><pubDate>Fri, 16 Jun 2006 22:26:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:634447</guid><dc:creator>David.Wang</dc:creator><description>Tracy - if you are saying that things work perfectly without web garden but randomly fails with web garden, then it is important to determine if the cause is due to:&lt;br&gt;1. The client is not sending the correct session ID cookie&lt;br&gt;2. The session ID is not retrieving the correct session state &lt;br&gt;3. Something else&lt;br&gt;&lt;br&gt;Also, can you describe the technical reason why you enable web garden? Read the following blog entry about performance/reliability tradeoffs for threading and web garden:&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/david.wang/archive/2006/03/14/Thoughts_on_Application_Pools_running_out_of_threads.aspx"&gt;http://blogs.msdn.com/david.wang/archive/2006/03/14/Thoughts_on_Application_Pools_running_out_of_threads.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#634452</link><pubDate>Fri, 16 Jun 2006 22:32:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:634452</guid><dc:creator>David.Wang</dc:creator><description>Dave - session state is simply a blob of data which a web page can retrieve with an ID. The ID comes from the browser; the blob of data can be stored either in a data structure inside the same process or elsewhere, using memory, SQL, disk, etc.&lt;br&gt;&lt;br&gt;ASP provides an implementation that stores the data in the memory of the process handing the ASP page. You have to either find or write an implementation that stores the data elsewhere, in a SQL Server, for example. This implementation can be exposed via COM object, etc.&lt;br&gt;&lt;br&gt;Some people have written implementations to perform the above and charge for it; you are always free to write your own. Or you can upgrade to ASP.Net and use its free implementation of a SQL Server-based out-of-process session state service.&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#642867</link><pubDate>Thu, 22 Jun 2006 17:16:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:642867</guid><dc:creator>Julien</dc:creator><description>Has anybody heard about the loss of the session when the name of the server contains &amp;quot;_&amp;quot;?&lt;br&gt;&lt;br&gt;My web application works on machines without &amp;quot;_&amp;quot; but if there is a &amp;quot;_&amp;quot; in the name, I lose the session...&lt;br&gt;&lt;br&gt;Thank you</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#644701</link><pubDate>Fri, 23 Jun 2006 22:53:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:644701</guid><dc:creator>David.Wang</dc:creator><description>Julien - that behavior is actually by-design. I found the answer by searching for:&lt;br&gt;lose ASP session state &amp;quot;_&amp;quot;&lt;br&gt;&lt;br&gt;The issue has nothing to do with IIS nor your web application but the loss of cookies.&lt;br&gt;&lt;br&gt;//David</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#650823</link><pubDate>Thu, 29 Jun 2006 18:39:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:650823</guid><dc:creator>Saumin</dc:creator><description>hi david,&lt;br&gt;We are upgrading from IIS 5 to IIS 6. We have 3 load balanced web servers. My question is in IIS6, do i still need to have same instance in IIS metabase for a website? i referred to &lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q325056"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;q325056&lt;/a&gt; for that. And do we have still have to generate a session key and put that same in machine.config on all 3 web servers?&lt;br&gt;I will appreciate your response.&lt;br&gt;&lt;br&gt;Thanks!&lt;br&gt;saumin</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#651120</link><pubDate>Thu, 29 Jun 2006 22:15:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:651120</guid><dc:creator>David.Wang</dc:creator><description>Saumin - No idea. Your questions are best answered on an ASP.Net Forum such as www.asp.net or by applicable KB articles based on your ASP.Net version.&lt;br&gt;&lt;br&gt;//David</description></item><item><title>Session timeout virker nu som den skal.</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#668115</link><pubDate>Mon, 17 Jul 2006 13:12:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:668115</guid><dc:creator>Walk the walk</dc:creator><description /></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#733070</link><pubDate>Thu, 31 Aug 2006 10:36:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:733070</guid><dc:creator>Imran Balouch</dc:creator><description>We are also experiencing the same problem as of Tracy.&lt;br&gt;We are using in process session ,but when I turn on the webgarden we randomly loose session before the time out of session.&lt;br&gt;And when we turn off the web garden than it works fine.</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#746925</link><pubDate>Sat, 09 Sep 2006 01:19:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:746925</guid><dc:creator>zeeomar</dc:creator><description>&amp;quot;Application Pool health monitoring metrics to not recycle the w3wp.exe until after 1440 minutes from the last user request &amp;quot;&lt;br&gt;&lt;br&gt;Instead of doing that, can you just recycle the process at a specific time, such as 1am., that would be the same right?&lt;br&gt;&lt;br&gt;also how do you disable the webgarden (do you just set the # of processes to 1? )</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#751616</link><pubDate>Wed, 13 Sep 2006 08:35:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:751616</guid><dc:creator>utsav</dc:creator><description>Hi everyone, can any one tell me where i can find the registry entry of application pool properties.. ie in performance tab for shutdown worker process after boing idle</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#771924</link><pubDate>Tue, 26 Sep 2006 12:15:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:771924</guid><dc:creator>naidelih</dc:creator><description>Hi does the javascript affect session timeout. i have a problem maintaining my session state i set it to timeout by 400 (400 minutes) I have a javascript(serves as a timer countdown within 50 minutes). the purpose of the java is to submit the page after 50 minutes but i lose session after that. any suggestions pls.</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#2162189</link><pubDate>Tue, 17 Apr 2007 12:52:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2162189</guid><dc:creator>Adam</dc:creator><description>&lt;p&gt;You can change the recycle settings within the IIS MMC - just get the porperties of the Applciation Pools. From here you can set it to recycle the process at specific times of the day or after a certain number of requests.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#3456217</link><pubDate>Fri, 22 Jun 2007 12:47:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3456217</guid><dc:creator>Sridhar</dc:creator><description>&lt;p&gt;We had &amp;quot;InProc&amp;quot; session management and the sessions would drop very randomly. &lt;/p&gt;
&lt;p&gt;Background&lt;/p&gt;
&lt;p&gt;We had a process which was logging the time and date the daemon process was run. See the below link, of what it has to say!&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/324772"&gt;http://support.microsoft.com/kb/324772&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Cause&lt;/p&gt;
&lt;p&gt;&amp;lt;b&amp;gt;if any file in the application's directory changes, the session would be lost! &amp;lt;/b&amp;gt;&lt;/p&gt;
&lt;p&gt;Strange but true, MSFT calls it a feature, but honestly I think this is a flaw in the “InProc” session management of MSFT IIS 6 Server. &lt;/p&gt;
&lt;p&gt;Solutions.&lt;/p&gt;
&lt;p&gt;1.Change the session management algorithm &lt;/p&gt;
&lt;p&gt;2.Don’t update or create any files in the application server directory &lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#3706130</link><pubDate>Thu, 05 Jul 2007 16:36:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3706130</guid><dc:creator>Ro</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I am developing a web site with ASP (Framework 1.1) and AJAX, which is running in a platform with the IIS6 in a Windows 2003 server.&lt;/p&gt;
&lt;p&gt;The session always expired after 20 minutes. I tried modifying all the timeouts of the Application Pools, and at last I disabled all the timeouts, the recycling schemes...&lt;/p&gt;
&lt;p&gt;Now my problem is that the static web pages run correctly, but the ones which are been updated lose the session after 20 minutes. The updating is done by means of AJAX requests each 8 minutes....&lt;/p&gt;
&lt;p&gt;The strage thing is that this problem doesn't happens in a platform.&lt;/p&gt;
&lt;p&gt;Could everyone help me?&lt;/p&gt;
&lt;p&gt;Thank you very much! &lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#3801164</link><pubDate>Tue, 10 Jul 2007 20:32:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3801164</guid><dc:creator>Girish</dc:creator><description>&lt;p&gt;Following are the issue we are facing&lt;/p&gt;
&lt;p&gt;1.In our case we are writting cookies through ASP file but then also after some idel time 20 minutes system could not read the values from cookies. In our application we are using ASP as well as .NET &lt;/p&gt;
&lt;p&gt;2. After recycling session state is lost. as such we are not using any session variables but we are using the cookies. due to session expiration system could not read the cookies. But this behavior is not obnserved for each recycling time. some times it expire session and some time not. &amp;nbsp;could not figure out how this is happening do you have any idea&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#4167330</link><pubDate>Wed, 01 Aug 2007 15:59:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4167330</guid><dc:creator>Mark Houldridge</dc:creator><description>&lt;p&gt;After upgrading to Service Pack 2 for Windows 2003 Server we noticed issues with session states in that browser session id's were switching unexpectidely causing problems with login forms and various other areas of our websites.&lt;/p&gt;
&lt;p&gt;To solve the problem with sessions I created a custom application pool within IIS, selected the application pool properties and limited the number of worker process to 1. &amp;nbsp;Anything more than 1 will cause IIS to spawn a new process and therefore assign a new session.&lt;/p&gt;
&lt;p&gt;I have tested from a number of browsers and this works. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a fix for people creating sessions on the fly within IIS.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#5243432</link><pubDate>Tue, 02 Oct 2007 18:01:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5243432</guid><dc:creator>Gavin campbel</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am having &amp;nbsp;real problem with this as well. I get the following error in the event log. A worker process with ID'12720' serving the defaultAppPool has requested a recycle because the worker process reached its allowed processing time limit. &lt;/p&gt;
&lt;p&gt;I lose session variables when this happens(after reading the above article that is far enough).However, i am not sure why this error happens i have about maybe 75 pages which connect to a database and create conn and rs objects , and i have noticed the connection string is in Session object and many of the pages do not destroy the recordsets or the conn to the db properly after closing them ( i.e.set them to nothing) could this lazy coding be causing my issues cause this recylce is happening about once a day consistently . I have about 100 users at anyone time accessing the web site.&lt;/p&gt;
&lt;p&gt;Basically i need the root cause of why the allowed processing time limit error is happening&lt;/p&gt;
&lt;p&gt;Any help or ideas would be appreicated&lt;/p&gt;
&lt;p&gt;Gavin&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#5361895</link><pubDate>Mon, 08 Oct 2007 15:51:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5361895</guid><dc:creator>Simcha</dc:creator><description>&lt;p&gt;I've had a problem on my site where, using classic ASP, the session variable gets halted/stalled and appears empty. &amp;nbsp;Refresh sometimes clears the problem resulting in the session variable containing what it should have done originally. &amp;nbsp;I've made sure the cookies are set correct and I've tried to remove any conflict with my AV software (Norton). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could it be a VISTA IE7 thing?&lt;/p&gt;
&lt;p&gt;Please, any ideas?&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#6437399</link><pubDate>Tue, 20 Nov 2007 19:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6437399</guid><dc:creator>Michael Smit</dc:creator><description>&lt;p&gt;Guys - THANK-YOU!!! We have been fiddling for 2 days (two of us) trying to figure out why sessions where lost every few minutes.&lt;/p&gt;
&lt;p&gt;The web farm thing worked. Perfectly. All is up and running.&lt;/p&gt;
&lt;p&gt;THANK-YOU AGAIN!!! You lot ROCK!&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8422050</link><pubDate>Thu, 24 Apr 2008 19:16:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8422050</guid><dc:creator>John Homer</dc:creator><description>&lt;p&gt;The ASP (not .Net) session timeout is stored in the ASP application configuration. This is accessed via the website properties (not the application pool) on the Home Directory tab. Click the configuration button and then select the Options tab. You may then set the ASP session timeout valus in minutes which is 20 by default. This will terminate any session afetr 20 minutes on inactivity.&lt;/p&gt;
&lt;p&gt;Note that this is independent of the application pool settings. In fact, you don't even need an application pool to utilize this setting. For instance, you can configure IIS 6 to run in IIS 5 compatibility mode (or just use IIS 5) and then configure your ASP Application Protection (Home Directory tab in website properties) to &amp;quot;Low (IIS Process)&amp;quot; which will run the application in-process (inside the &amp;nbsp;inetinfo.exe process instead of w3wp.exe or dllhost.exe). Even in this scenario, the ASP timeout setting mentioned above is still effective.&lt;/p&gt;
&lt;p&gt;For ASP.Net you can configure the session timout in your application's web.config. Look for the following line and configure accordingly:&lt;/p&gt;
&lt;p&gt;&amp;lt;sessionState mode=&amp;quot;InProc&amp;quot; cookieless=&amp;quot;false&amp;quot; timeout=&amp;quot;20&amp;quot;/&amp;gt;&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8622853</link><pubDate>Thu, 19 Jun 2008 22:31:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8622853</guid><dc:creator>EricWiz</dc:creator><description>&lt;p&gt;I just wanted to say thanks!! This post and the resulting comments helped me solve a nagging problem with users being 'randomly' logged out.&lt;/p&gt;
&lt;p&gt;I am using classic ASP and the web garden was &amp;gt; 1. Once I dropped it to 1 the problem disappeared.&lt;/p&gt;
&lt;p&gt;So it effects classic asp as well. Seems like the this information should really be added to the help section for IIS.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8743583</link><pubDate>Thu, 17 Jul 2008 15:07:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8743583</guid><dc:creator>Bryan</dc:creator><description>&lt;p&gt;Hello David,&lt;/p&gt;
&lt;p&gt;I have taken over this project at my company and its developed in ASP, now they use session to identify pages, xx1 = apage.asp&lt;/p&gt;
&lt;p&gt;Now i can tell you i am no good in ASP, just started learning it.&lt;/p&gt;
&lt;p&gt;The session is created in the global.asa (dit some research on ASP and understand it) but the session is not created, now is this same project online on a different server and working.&lt;/p&gt;
&lt;p&gt;But with me the sessions is just not created so i cant visit the pages, do you have any idea's?&lt;/p&gt;
&lt;p&gt;I understand sessions and the global.asa a bit, but i cant find the problem so i cant solve the problem...&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Bryan&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8755544</link><pubDate>Sat, 19 Jul 2008 20:11:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8755544</guid><dc:creator>John</dc:creator><description>&lt;p&gt;12 hours later, our 'caching' problem (apparent random results assumed to be cached pages from previous requests) is solved simply by dropping the number of worker processes from 2 to 1 on our quad-core web server (fat lot of use that is!).&lt;/p&gt;
&lt;p&gt;Thanks to all here for getting this page Google-able.&lt;/p&gt;
&lt;p&gt;Gotta say that it's hard to believe that I'm using VS2008/C# 3.5/Win 2003 Server &amp;amp; IIS 6 and MS *STILL* haven't made it all hang together properly for multi-core web servers (y'know, like anything made in the past years ...).&lt;/p&gt;
&lt;p&gt;Thanks again guys.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8769004</link><pubDate>Thu, 24 Jul 2008 11:37:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8769004</guid><dc:creator>David.Wang</dc:creator><description>&lt;p&gt;John - Actually, Microsoft INTENTIONALLY did not make ASP hang properly on multi-core with the ease of ASP.Net&lt;/p&gt;
&lt;p&gt;Microsoft has long made it hang together properly, from the beginning, for ASP.Net with the Session State Service. However, ASP predates all of this discussion, and there was a consciously decision in IIS6 to NOT produce a ASP Session State Service which would have addressed your concerns.&lt;/p&gt;
&lt;p&gt;You can view the decision as -- by making an ASP Session State Service, that would be one more thing prohibiting people from migrating to ASP.Net -- so to promote ASP.Net and the future of .Net, ASP had to be less capable.&lt;/p&gt;
&lt;p&gt;//David&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8894219</link><pubDate>Mon, 25 Aug 2008 19:23:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8894219</guid><dc:creator>Scorpion</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Your posts are very great assest to developers (great job!)&lt;/p&gt;
&lt;p&gt;I have a web application written in ASP classic. &lt;/p&gt;
&lt;p&gt;We have upgraded to IIS 6, and I was/am experiencing a session timeout problem, I searched the web and updated the IIS configuration to eleiminate the worker process recycling (and other settings as well that are listed above).&lt;/p&gt;
&lt;p&gt;The problem is: &lt;/p&gt;
&lt;p&gt;When I leave any page idle for about 10~25 minutes and try to go to any other page, I get the message &amp;quot;You are about to be redirected to a connection that is not secure.&lt;/p&gt;
&lt;p&gt;The information you are sending to the current site might be retransmitted to a non-secure site. Do you with to continue?&amp;quot;&lt;/p&gt;
&lt;p&gt;This happens while I am not using any secured page(https) in this application, and the session is lost again.&lt;/p&gt;
&lt;p&gt;What could be the problem? What to search for? I am lost!&lt;/p&gt;
&lt;p&gt;Please advice.&lt;/p&gt;
&lt;p&gt;Thanks in advance. &lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8894314</link><pubDate>Mon, 25 Aug 2008 20:05:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8894314</guid><dc:creator>Scorpion</dc:creator><description>&lt;p&gt;Correction:&lt;/p&gt;
&lt;p&gt;Your posts are a great asset to developers (great job!)&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8895326</link><pubDate>Tue, 26 Aug 2008 01:37:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8895326</guid><dc:creator>Stephen Botha</dc:creator><description>&lt;p&gt;David, A quick question regarding what seems to be a recycling issue as well. With a couple of sites on iis6 and each one using their own application pool, there is one of them out of all the 6 that cannot seem to hold onto what i believe is a session. After about 60 minutes, not always, but around that time it seems that the session dies because i can no longer read the data stored in a simple script from a session. I believe it has everything to do with the fact that his site seems to be extremely slow and the single cause for his whole server to be lagging severely. Once i stop his site (which is largely ASP driven) the server regains its performance. As well the script is able to run without losing its session. I think its a simple matter of the site overloading asp threads, but i'm not to firm on the understanding of what happens in this case. Does the application pool moniter the asp threads, and once it reaches too many processes it recycles it and therefore causes the application object to lost its session?&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8936679</link><pubDate>Tue, 09 Sep 2008 17:14:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8936679</guid><dc:creator>Robert</dc:creator><description>&lt;p&gt;Having read these posts I think I have a situation that is unique that maybe someone can help answer. &amp;nbsp;The session state is only being lost on one specific install of IE7. &amp;nbsp;All other users are able to log in and retain the session state except for one user. &amp;nbsp;The user is running Symantec Corporate and we disable this to ensure the virus software was not interfering. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any suggestions on how this can occur?&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8939062</link><pubDate>Wed, 10 Sep 2008 08:32:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8939062</guid><dc:creator>David.Wang</dc:creator><description>&lt;p&gt;Robert - it sounds like that specific user is somehow disabling cookies, which is used to maintain session state between the browser and server.&lt;/p&gt;
&lt;p&gt;//David&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8976967</link><pubDate>Sun, 05 Oct 2008 14:12:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8976967</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;David, all I can say is You Are Great!&lt;/p&gt;
&lt;p&gt;Every time I have an issue I surf all kinds of forums googling my problem, and I never found such a great explanation on an issue as the one you have provided.&lt;/p&gt;
&lt;p&gt;Here's what I do to manage webfarming on ASP using in process session state:&lt;/p&gt;
&lt;p&gt;Use a redirection page that will contains the following code&lt;/p&gt;
&lt;p&gt;==========================================&lt;/p&gt;
&lt;p&gt;	- Generate a Unique ID (This can easily be done by inserting into a &amp;quot;dummy&amp;quot; table that only contains an identity number)&lt;/p&gt;
&lt;p&gt;	- Every session element is saved into a table in the database that contains a unique ID, and the current DateTime:&lt;/p&gt;
&lt;p&gt;	ID / SessionVariableName / SessionVariableValue / DateTime&lt;/p&gt;
&lt;p&gt;	- POST the unique ID and the main page address of the current server (where the user would go to log in for the first time) to a receiving page in the new server and anyother POST if necesary&lt;/p&gt;
&lt;p&gt;In the new server (receiving page)&lt;/p&gt;
&lt;p&gt;	- The Unique ID will be used to get the session variables from the DB and be defined in the new server.&lt;/p&gt;
&lt;p&gt;	- The current time is matched with the datetime saved in the db table plus a configurable value (1 minute at the most)&lt;/p&gt;
&lt;p&gt;	- If it matches, deletes all the entries for the selected UniqueID Ensuring that even if the time didn't pass, the session variables will not be available in the db.&lt;/p&gt;
&lt;p&gt;	- If it doesn't match redirect to the caller's home page (for security purposes).&lt;/p&gt;
&lt;p&gt;Hope it helps!!&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#8977421</link><pubDate>Mon, 06 Oct 2008 06:04:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8977421</guid><dc:creator>David.Wang</dc:creator><description>&lt;p&gt;Lucas - Actually, you describe an out-of-process session state implementation, which should work perfectly fine (and you've verified it!) :-)&lt;/p&gt;
&lt;p&gt;The actual state values are in the database table, which is stored outside the process serving ASP. You essentially pass a SessionID around to any server in the web farm, which can access the same session state from the database, no matter which server in the web farm handles the request.&lt;/p&gt;
&lt;p&gt;This is analogous in behavior to the ASP.Net Session State Service, and the design is quite effective at leverage IIS6 Web Gardens and Web Farms in a scale-out fashion to handle load.&lt;/p&gt;
&lt;p&gt;//David&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9253493</link><pubDate>Fri, 26 Dec 2008 16:59:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9253493</guid><dc:creator>Leandro Tami</dc:creator><description>&lt;p&gt;@Lucas &amp;amp; David Wang: Be extremely careful with that approach! You should make sure that session ids are not only unique but unpredictible as well, or someone might just tamper their POST parameter a bit and stole someone else's session!&lt;/p&gt;
&lt;p&gt;Using an identity field as a session id generator is probably the worst idea because it will generate sequential IDs. I recommend you to do a small change: remove identity to the SessionID field and assign it &amp;quot;newid()&amp;quot; as default value. That will generate random alphanumerical strings which are possibly extremely difficult to predict. If you still need it to be numerical, then use a random function. &lt;/p&gt;
&lt;p&gt;Oh, and finally, make sure you're deleting records of expired sessions and not accumulating them in the session table&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9339429</link><pubDate>Mon, 19 Jan 2009 07:42:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9339429</guid><dc:creator>Nitin</dc:creator><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I have little different kind of plroblem.&lt;/p&gt;
&lt;p&gt;-----------------------------------------------&lt;/p&gt;
&lt;p&gt;I am using VS 2005 ASp.Net. and in my web application i manage my Session out proc state i.e. in Sql Server. there are two module in it. in which one is working fine and all the session variable mantain properly but in another module some of the session variable losing its value with in 5 sec on the same page or either on redirect on the other page. i can change my session variable name but still the problem exist.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nitin&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9593183</link><pubDate>Thu, 07 May 2009 11:53:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9593183</guid><dc:creator>Chris Yao</dc:creator><description>&lt;p&gt;I'm lost.&lt;/p&gt;
&lt;p&gt;If by default, the WWW service establishes an overlapped recycle, in which the worker process that is to be shut down is kept running until after a new worker process is started, how come the session state will be lost? &lt;/p&gt;
&lt;p&gt;(&lt;a rel="nofollow" target="_new" href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/24e3c22e-79a9-4f07-a407-dbd0e7f35432.mspx?mfr=true"&gt;http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/24e3c22e-79a9-4f07-a407-dbd0e7f35432.mspx?mfr=true&lt;/a&gt;)&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9605562</link><pubDate>Tue, 12 May 2009 05:14:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9605562</guid><dc:creator>Just D.</dc:creator><description>&lt;p&gt;A new look of the old problem. Thanks for this article! Really, we got the same problem on our server, and I'm testing the server and its settings basing on this article.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9816922</link><pubDate>Fri, 03 Jul 2009 20:40:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9816922</guid><dc:creator>Robert</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;I wanted to report back that after trying everything I could to resolve my issue with session state I was not able to resolve it. &amp;nbsp;I recently had a PC crash and had to rebuild from scratch. (Don't worry, I had a recent back-up of everything).&lt;/p&gt;
&lt;p&gt;When I diagnosed the reason for the crash it was related to a corrupt registry. &amp;nbsp;My registry was massive and I now believe it was the root of this issue. &amp;nbsp;(I previously tried some registry cleaning software and none of them worked. &amp;nbsp;I have also read that many of these cause more harm than good and should not be used.)&lt;/p&gt;
&lt;p&gt;So while there are a lot of great suggestions here about resolving session state problems, if none of them work you may have my issue and require a complete rebuild. &amp;nbsp;I do not know if there could have been other solutions, but when I consider the hours spent searching for solutions and trying different things, in the end the fastest solution was to do a clean install of everything.&lt;/p&gt;
&lt;p&gt;Hopefully this post will help others avoid the hours of frustration trying to resolve this problem.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9888772</link><pubDate>Fri, 28 Aug 2009 22:42:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9888772</guid><dc:creator>BEK</dc:creator><description>&lt;p&gt;David,&lt;/p&gt;
&lt;p&gt;We have an 3rd party application developed using Framework 1.1, which is running on a platform using IIS6 in a Windows 2003 server.&lt;/p&gt;
&lt;p&gt;The application randomly &amp;quot;loses&amp;quot; the session variables. &amp;nbsp;When this occurs the aspx pages throw the &amp;quot;Object reference not set ...&amp;quot; exception.&lt;/p&gt;
&lt;p&gt;I have tracked the occurences back thru the Web site log and I am seeing a number of sc-win32-status = &amp;quot;64&amp;quot; errors. &lt;/p&gt;
&lt;p&gt;When the &amp;quot;64&amp;quot; error occurs in the GET 200 transaction of the first page, the sc-bytes value is much smaller than normal, the time-taken value is much higher than normal, and the called aspx page throws the exception when trying to use the Session values in creating its content.&lt;/p&gt;
&lt;p&gt;Below is a section of the Web log showing the &amp;quot;normal&amp;quot; behaviour vs the behaviour when a &amp;quot;64&amp;quot; error is encounterd. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Normal behaviour						&lt;/p&gt;
&lt;p&gt;cs-method	cs-uri-stem	sc-status	sc-substatus	sc-win32-status	sc-bytes	cs-bytes	time-taken&lt;/p&gt;
&lt;p&gt;GET	/App1/Page1.aspx	200	0	0	22869	495	406&lt;/p&gt;
&lt;p&gt;POST	/App1/Page1.aspx	302	0	0	453	4834	265&lt;/p&gt;
&lt;p&gt;GET	/App1/Page2.aspx	200	0	0	15374	603	312&lt;/p&gt;
&lt;p&gt;Abnormal Behaviour							&lt;/p&gt;
&lt;p&gt;cs-method	cs-uri-stem	sc-status	sc-substatus	sc-win32-status	sc-bytes	cs-bytes	time-taken&lt;/p&gt;
&lt;p&gt;GET	/App1/Page1.aspx	200	0	64	288	495	812&lt;/p&gt;
&lt;p&gt;POST	/App1/Page1.aspx	302	0	0	453	1850	171&lt;/p&gt;
&lt;p&gt;GET	/App1/Page2.aspx	200	0	0	1124	603	328&lt;/p&gt;
&lt;p&gt;Notice the sc-bytes value shrinks from 22869 to 288, the time-take increases from 406 to 812, and the sc-bytes for Page2.aspx shrinks from 15374 to 1124.&lt;/p&gt;
&lt;p&gt;Do you have any ideas on what is happening?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9891093</link><pubDate>Thu, 03 Sep 2009 23:59:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9891093</guid><dc:creator>Pamela Hansard</dc:creator><description>&lt;p&gt;I have the same question as Chris Yao stated above, which does not appear to have been addressed yet.&lt;/p&gt;
&lt;p&gt;**************************************************&lt;/p&gt;
&lt;p&gt;If by default, the WWW service establishes an overlapped recycle, in which the worker process that is to be shut down is kept running until after a new worker process is started, how come the session state will be lost? &lt;/p&gt;
&lt;p&gt;(&lt;a rel="nofollow" target="_new" href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/24e3c22e-79a9-4f07-a407-dbd0e7f35432.mspx?mfr=true"&gt;http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/24e3c22e-79a9-4f07-a407-dbd0e7f35432.mspx?mfr=true&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;**************************************************&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9905367</link><pubDate>Fri, 09 Oct 2009 12:51:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9905367</guid><dc:creator>Chhengkong</dc:creator><description>&lt;p&gt;Hi Dear&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Can you help me about losing session. I use webconfig for control session all the page but it usually losing session I don't know the problem. If you know can you tell me?&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9923878</link><pubDate>Tue, 17 Nov 2009 21:39:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923878</guid><dc:creator>Yan</dc:creator><description>&lt;p&gt;My session state is set to serverstate, and timeout is set to 60 minutes, however each session still expires in about 20 minutes.&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9923881</link><pubDate>Tue, 17 Nov 2009 21:41:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923881</guid><dc:creator>Yan</dc:creator><description>&lt;p&gt;I mean session state is StateServer in the last post&lt;/p&gt;
</description></item><item><title>re: Why do I lose ASP Session State on IIS6</title><link>http://blogs.msdn.com/david.wang/archive/2005/09/19/Why-do-I-lose-ASP-Session-State-on-IIS6.aspx#9930579</link><pubDate>Tue, 01 Dec 2009 05:24:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9930579</guid><dc:creator>Yogesh</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Thank you very much for such a great information. I am facing early timeout problem. Everywhere I have marked as 20 minutes, but session times out just after login or after logged in and searched any thing in our application, it throws the user out of the application (session timeout). This is well running application for last 2 years and now we are facing the problem.&lt;/p&gt;
&lt;p&gt;Environment: ASP.NET 2.0, W2K3 server, Load Balanced Clustered Servers. &lt;/p&gt;
&lt;p&gt;I have checked Web.config file of Application, Application session timeout in IIS, Default website session timeout in IIS, Worker process idle timeout of application pool, Recycle timeout period of application pool, Antivirus setting and everywhere it is mentioned correctly i.e. 20 minutes.&lt;/p&gt;
&lt;p&gt;I am not able to resolve the issue and client is asking for urgent resolution.&lt;/p&gt;
</description></item></channel></rss>