﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Occasional session lost Or slow response w/ IIS 6</title><link>http://www.aspplayground.net/forum/</link><description /><copyright>(c) ASP Playground Support Forum</copyright><ttl>30</ttl><item><title>Occasional session lost Or slow response w/ IIS 6 (Samuel)</title><description>  &lt;font size="4"&gt;&lt;font color="#ff0000"&gt;Q:&lt;/font&gt;&lt;/font&gt; Everything was working until I migrated my site to IIS 6.0 / Windows 2003. After the migration, my users frequently encountered session loss problem. They sometimes got redirected to a page saying that they entered the forum with an URL that contained invalid Session ID when they submitted a post. &lt;br&gt;   &lt;br&gt;  &lt;font size="4"&gt;&lt;font color="#006600"&gt;A:&lt;/font&gt;&lt;/font&gt; There are two modes to set up an IIS 6 server. One is called &lt;b&gt;worker process isolation mode&lt;/b&gt; and the other &lt;b&gt;IIS 5 isolation mode&lt;/b&gt;.    &lt;br&gt;   &lt;br&gt;  &lt;font face="trebuchet ms"&gt;&lt;font size="4"&gt;&lt;/font&gt;&lt;/font&gt;Our forum software uses ASP.NET's built-in session object to manage sessions and it runs fine on either modes for IIS 6, unless you use the &lt;b&gt;Web Gardens &lt;/b&gt; feature to manage &lt;b&gt;more than 1&lt;/b&gt; worker processes under &lt;b&gt;worker process isolation mode&lt;/b&gt;. The default value is 1.    &lt;br&gt;   &lt;br&gt;  To configure a Web Garden back to its original setting (see figure 1): &lt;ol&gt;&lt;li&gt; In IIS Manager, expand the local computer, expand &lt;b&gt;Application Pools&lt;/b&gt;, right-click the application pool, and then click &lt;b&gt;Properties&lt;/b&gt;. &lt;li&gt; Click the &lt;b&gt;Performance &lt;/b&gt; tab, and under &lt;b&gt;Web garden&lt;/b&gt;, in the &lt;b&gt;Maximum number of worker processes &lt;/b&gt; box, type 1. &lt;li&gt; Click &lt;b&gt;OK&lt;/b&gt;.   &lt;/ol&gt;  &lt;br&gt;  Also, the other cause could be the &lt;b&gt;Health Monitoring&lt;/b&gt; feature on IIS6 &lt;b&gt;recycling the worker process&lt;/b&gt; once in a while.  &lt;br&gt;   &lt;br&gt;  By default IIS&amp;nbsp;6.0 is configured to recycle its worker process every 29 hours. This is a bit aggressive for an application running ASP.NET and it is recommended that automatic worker process recycling is disabled (see figure 2).  &lt;br&gt;   &lt;br&gt;  It is also recommended to turn of idle timeout shutdown as well (see figure 1). &lt;br&gt;   &lt;br&gt;  A user of ours, Gun, told us why the problem still persists on his site after following the above suggestion (I edited his message a bit):    &lt;br&gt;   &lt;br&gt;  &lt;blockquote class="quote"&gt;&lt;div style="width:50%;font-weight:bold; padding-bottom:4px;"&gt;&lt;/div&gt;We just solved lost login problem. It was caused by the "20 cookie per domain" limit. In previous years we modified our ad program to use cookies. But in the forum there are lot of banner zones so once a user is filled with cookies (I have seen 23) previous cookies start getting deleted by the browser. So after the influx of our banner cookies, APG's session cookies get deleted and users are forced to log out. &lt;/blockquote&gt;    &lt;br&gt;   &lt;br&gt;  So, if you still have these lost login problems after following my suggestion above, check out the other web based software that you use because it is very possible that under the hood the other software is using cookies excessively which will force our session cookies to be deleted.    &lt;br&gt;   &lt;br&gt;  The general rules for cookie are:    &lt;br&gt;   &lt;br&gt;  4,000 byte (4Kb) limit for each cookie    &lt;br&gt;  Maximum limit of 20 cookies per domain    &lt;br&gt;   &lt;br&gt;  &lt;i&gt;&lt;font size="1"&gt;IIS 6, isolation, worker process, session lost, ASP.NET, cookie, recycle&lt;/font&gt;&lt;/i&gt; </description><link>http://www.aspplayground.net/forum/fb.ashx?m=385297</link><pubDate>Mon, 11 Oct 2004 21:55:05 GMT</pubDate></item></channel></rss>
