<?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>ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx</link><description>Last night I got a question from one of the readers of the blog that went like this: “We are facing a problem that i cannot understand, every now and than i see that my app domain is recycled (i have a log in the application_end), I check the IIS logs</description><dc:language>sv-SE</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#686393</link><pubDate>Wed, 02 Aug 2006 15:52:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:686393</guid><dc:creator>Snorrk</dc:creator><description>Great post!</description></item><item><title>Soci blog  &amp;raquo; Blog Archive   &amp;raquo; Mikor ??s mi??rt indul ??jra egy asp.net app?</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#686411</link><pubDate>Wed, 02 Aug 2006 16:13:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:686411</guid><dc:creator>Soci blog  » Blog Archive   » Mikor ??s mi??rt indul ??jra egy asp.net app?</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://soci.hu/blog/index.php/2006/08/02/mikor-es-miert-indul-ujra-egy-aspnet-app/"&gt;http://soci.hu/blog/index.php/2006/08/02/mikor-es-miert-indul-ujra-egy-aspnet-app/&lt;/a&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#686458</link><pubDate>Wed, 02 Aug 2006 17:03:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:686458</guid><dc:creator>Jason</dc:creator><description>Great post, Tess. &amp;nbsp;Thanks so much for sharing this info!</description></item><item><title>Why do app domain recycle (when you don't want them to)</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#686591</link><pubDate>Wed, 02 Aug 2006 18:54:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:686591</guid><dc:creator>ÎÜñ|‹ø\/\/ñ [ÐëÞrëçã†ëð]'s Blog</dc:creator><description>Well, if you have ever wondered, Tess has a great post listing out the various reasons why. Well worth</description></item><item><title>Link Listing - August 2, 2006</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#687225</link><pubDate>Thu, 03 Aug 2006 07:35:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:687225</guid><dc:creator>Christopher Steen</dc:creator><description>&lt;br&gt; &amp;nbsp;My &lt;br&gt; &amp;nbsp;ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas &amp;amp;quot;Highlights Page&amp;amp;quot; [Via: &lt;br&gt; &amp;nbsp;ScottGu ] &lt;br&gt; &amp;nbsp;Sending...</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#687348</link><pubDate>Thu, 03 Aug 2006 11:00:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:687348</guid><dc:creator>Ran Davidovitz</dc:creator><description>Great post indeed, Thank you.</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#687398</link><pubDate>Thu, 03 Aug 2006 12:24:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:687398</guid><dc:creator>Pedro Rui Silva</dc:creator><description>Great post it helped my a lot, we were having many timeout's and we didn't have a clue on why they were happening. Thank's.</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#687738</link><pubDate>Thu, 03 Aug 2006 20:20:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:687738</guid><dc:creator>Yaroslav Vysotsky</dc:creator><description>Great! Very useful post. Hope that will help us to solve a problem. Thanks!</description></item><item><title>Interesting Finds: August 2 </title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#688172</link><pubDate>Fri, 04 Aug 2006 06:26:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:688172</guid><dc:creator>Jason Haley</dc:creator><description /></item><item><title>August 9th ASP.NET Link-Listing</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#693072</link><pubDate>Wed, 09 Aug 2006 11:31:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:693072</guid><dc:creator>ScottGu's Blog</dc:creator><description>Below are some nice articles and links I&amp;amp;amp;rsquo;ve found on the web over the last week that I enjoyed,</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#693170</link><pubDate>Wed, 09 Aug 2006 14:46:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:693170</guid><dc:creator>JasonBSteele</dc:creator><description>Tess, &lt;br&gt;&lt;br&gt;This is a really useful post and has given me several pointers.&lt;br&gt;&lt;br&gt;However, I am having a problem where my users are loosing their session and the folowing messag eis appearing in th event log:&lt;br&gt;Event code: 4005 &lt;br&gt;Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;br&gt;&lt;br&gt;Doing a bit of googling reveals that a few other people are having this problem but nobody has really come up with a good explanation why. Perhaps this could be the subject of a future blog? /emote Fails miserably at charming smile&lt;br&gt;&lt;br&gt;Also of possible relevance is that my web application is organised with each of my ciustomers having their own virtual folder which is pointing at a particular version of the product. So I have folders v1.1, v1.2 etc with virtual folders CompA..CompS pointing to v1.1 and CompT..CompZ pointing to v1.2. When I make a new release I create a new release folder and then repoint each company virtual folder as and when they are ready for the new release.&lt;br&gt;&lt;br&gt;What are the pros and cons for this? Am I wasting loads of memory by having an AppDomain for each company when they could all be using a single AppDomain?&lt;br&gt;&lt;br&gt;Thanks for your time,&lt;br&gt;Jason</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#694001</link><pubDate>Thu, 10 Aug 2006 06:57:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:694001</guid><dc:creator>Rodel E. Dagumampan</dc:creator><description>A very nice post. keep them coming.</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#695274</link><pubDate>Fri, 11 Aug 2006 12:46:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:695274</guid><dc:creator>Ramachandran</dc:creator><description>I want to know the internals of how the ASP.NET request is processed from the begining ( the user typing the url) to the end ( Appdomain unload). Is there any material or links. This post is really useful and if there are many posts like this then that will be great :)</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#696692</link><pubDate>Sat, 12 Aug 2006 20:26:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:696692</guid><dc:creator>Ken Egozi</dc:creator><description>I'm having a Session clearing problem with a project I'm running.&lt;br&gt;I'll try yo investigate on you leads (web.config change by some service) but I think that it's due to another thing. The website allows a lot of file uploads, through simple http requests, so my guess is that it is caused by inflation in the memory used by the AppDomain. Do you think that this can cause AppDomain restarts?&lt;br&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#699378</link><pubDate>Mon, 14 Aug 2006 14:24:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:699378</guid><dc:creator>Tess</dc:creator><description>If it is due to memory usage, it would probably be caused by an out of memory exception, but then you wouldnt only see an appdomain restart, you would see the whole process restart (likely with a stopped unexpectedly eventlog entry). &amp;nbsp;Could it be that as part of the file upload you copy the results into the bin directory or similar? &amp;nbsp;I would try to log the restart reason and go from there. </description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#699389</link><pubDate>Mon, 14 Aug 2006 14:35:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:699389</guid><dc:creator>Tess</dc:creator><description>Ramachandran,&lt;br&gt;&lt;br&gt;I am not sure if this is what you are looking for, but here is an article on the page lifecycle, from when the request comes in to the ASP.NET layer to the unload of the page object&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/ms178472.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms178472.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;It doesn't cover what happens before ASP.NET gets a hold of it, and it doesnt cover the appdomain unload since that is not really part of a request, but a part of the whole application, so again, I am not sure if it is what you are looking for, but it is pretty good... </description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#699402</link><pubDate>Mon, 14 Aug 2006 14:51:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:699402</guid><dc:creator>Tess</dc:creator><description>JasonBSteele,&lt;br&gt;&lt;br&gt;I hadn't seen the issue you describe before but a quick internal search revealed that you might be running into this issue which has to do with URL rewrites:&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/911300"&gt;http://support.microsoft.com/kb/911300&lt;/a&gt;&lt;br&gt;&lt;br&gt;The NullReferenceException mentioned in there might be what causes your tickets to seem expired. &lt;br&gt;&lt;br&gt;If it was my own app, and I could reproduce, i would probably log exceptions to see what I could find. &lt;br&gt;&lt;br&gt;I am not sure if you have any alternative ways of setting it up (without getting too deep into your particular architecture) but each appdomain has a certain overhead, and depending on how things are linked it might be quite large if you keep loading copies of the same dlls.&lt;br&gt;&lt;br&gt; </description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#715028</link><pubDate>Wed, 23 Aug 2006 20:53:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:715028</guid><dc:creator>Troy Hall</dc:creator><description>In my case, I was using the Enterprise Library Logging Block to write to the web application root directory (locally, on my dev machine only!). Once I reconfigured to stop this logging, and reset the app domain manually (resaving web.config) the session reset went away. THANKS!!! This page gave me the clues to move on.</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#716372</link><pubDate>Thu, 24 Aug 2006 09:23:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:716372</guid><dc:creator>Tess</dc:creator><description>Awesome, glad it helped:)</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#754419</link><pubDate>Thu, 14 Sep 2006 20:57:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:754419</guid><dc:creator>Rich S.</dc:creator><description>I enjoyed the article, and was hopeful when I started tracking application restarts. I found that my application isn't restarting when the session is unexpectedly abandoned. &lt;br&gt;&lt;br&gt;Can you recommend a course of debugging when it is only the session that seems to be intermittently and [seemingly] inconsistently restarting?&lt;br&gt;&lt;br&gt;TIA,&lt;br&gt;&lt;br&gt;Rich</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#762151</link><pubDate>Tue, 19 Sep 2006 18:11:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:762151</guid><dc:creator>JasonBSteele</dc:creator><description>Tess,&lt;br&gt;&lt;br&gt;I wouldn't say that my application has the characteristics suggested in &lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/kb/911300"&gt;http://support.microsoft.com/kb/911300&lt;/a&gt; &lt;br&gt;It doesn't use URL re-writing, it simply uses several virtual folders (which often point to thesame physical folders).&lt;br&gt;&lt;br&gt;However, further investigation has revealed that the ticket expired event does not appear to coincide with the session loss.&lt;br&gt;&lt;br&gt;I followed your advice and swiched on the health monitoring logging and found that the session loss was caused by a &amp;quot;Application is shutting down. Reason: Configuration changed&amp;quot;&lt;br&gt;&lt;br&gt;However, nothing is touching the files you mentioned (no indexing, virus checking backups etc.). I have used FileMon and it also indicates that nothing is happening to the files.&lt;br&gt;&lt;br&gt;I know of one other person is having the same problem, see &lt;a rel="nofollow" target="_new" href="http://www.velocityreviews.com/forums/t294620-application-restarting-configuration-has-changed.html"&gt;http://www.velocityreviews.com/forums/t294620-application-restarting-configuration-has-changed.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;who has been trying to resolve this with MS support for quite some time now.&lt;br&gt;&lt;br&gt;Have you heard of this issue, or can you suggest a way of investigating it further?&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;JasonBSteele&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#785819</link><pubDate>Tue, 03 Oct 2006 15:55:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:785819</guid><dc:creator>JDelmerico</dc:creator><description>JasonBSteele &amp; Tess,

I can confirm the same behavior here.  I am seeing app domain restarts no apparent cause under the label of "Application is shutting down. Reason: Configuration changed."  according to the ASP.NET 2.0 health monitoring API.  I also ran Filemon and  confirmed there were no writes affecting of config file around the time of the restart.  The only file activity affecting the web.config file is the aspnet_wp itself, and only reads.</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#819514</link><pubDate>Thu, 12 Oct 2006 16:01:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:819514</guid><dc:creator>Sudeep</dc:creator><description>&lt;p&gt;JDelmerico,&lt;/p&gt;
&lt;p&gt;In ASP.NET 2.0, any change to the contents of the application folder can cause an appdomain restarts. Check out Toddca's site:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="https://blogs.msdn.com/toddca/archive/2006/07/17/668412.aspx"&gt;https://blogs.msdn.com/toddca/archive/2006/07/17/668412.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Does filemon show any files from the application folder being *touched* ?&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#850250</link><pubDate>Fri, 20 Oct 2006 22:42:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:850250</guid><dc:creator>Tony Bunce</dc:creator><description>&lt;p&gt;How can I get a dump file when my AppDomain restarts? &amp;nbsp;I am logging asp.net app restarts via the method described by ScottGu and am getting some weird results and want to dig deeper.&lt;/p&gt;
&lt;p&gt;_shutDownMessage=Overwhelming Change Notification in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config&lt;/p&gt;
&lt;p&gt;nothing is changing in that directory (watched it with filemon) and even turned off NTFS last access time to see if that would help and it didn't.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#871027</link><pubDate>Wed, 25 Oct 2006 06:29:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:871027</guid><dc:creator>Jethro</dc:creator><description>&lt;p&gt;I can confirm the same behavior here. I am seeing app domain restarts no apparent cause under the label of &amp;quot;Application is shutting down. Reason: Configuration changed.&amp;quot; according to the ASP.NET 2.0 health monitoring API. I also ran Filemon and confirmed there were no writes affecting of config file around the time of the restart. The only file activity affecting the web.config file is the aspnet_wp itself, and only reads. &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#871201</link><pubDate>Wed, 25 Oct 2006 09:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:871201</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;If you receive the Overwhelming Change Notifications and noone is touching the files I would recommend that you contact Microsoft Support. &amp;nbsp;It might be a problem in the framework that you are running into where ASP.NET reports an error during filechangesmonitoring as &amp;quot;overwhelming change notifications&amp;quot;, &amp;nbsp;normally the way to troubleshoot is to set breakpoints on filechanges notification functions in the &amp;nbsp;webengine to see what error occurred. &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#874144</link><pubDate>Wed, 25 Oct 2006 20:59:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:874144</guid><dc:creator>abbstl</dc:creator><description>&lt;p&gt;JasonBSteele -&lt;/p&gt;
&lt;p&gt;Did you ever figure out the cause of your issue?&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1054376</link><pubDate>Fri, 10 Nov 2006 18:12:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1054376</guid><dc:creator>JohnWilley</dc:creator><description>&lt;p&gt;We're having frequent recycles with event message &amp;quot;Reason: Configuration Changed&amp;quot;. &amp;nbsp;Like several other folks, we've confirmed with filemon that nothing but w3wp.exe is touching the application folder.&lt;/p&gt;
&lt;p&gt;Wondering if anyone found the problem??&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1572376</link><pubDate>Thu, 01 Feb 2007 15:18:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1572376</guid><dc:creator>Payal</dc:creator><description>&lt;p&gt;Great article..and helped me a lot..but i have one other issue related to session variable..My application is in asp.net 1.1..when i login in to the application i can see my details properly..but after some time in between i m able to see other person's details instead of mine..and this problem is not happening frequently.. It is happening some times..can you please tell me reason and the solution. I have stored user information in one session variable..depending on that i have shown user details. &lt;/p&gt;
&lt;p&gt;This problem we are getting on live server only..not on other servers. &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1572438</link><pubDate>Thu, 01 Feb 2007 15:27:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1572438</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi Payal,&lt;/p&gt;
&lt;p&gt;Pretty much every time I have seen this it has been one of two things.&lt;/p&gt;
&lt;p&gt;1. The thing that is being put in session scope is comming from a cached or static object of some sort without proper locking mechanisms so while you are reading, some other thread/user has already written new data to it. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. A router or load balancer is used and the users come from the same ISP getting the same IP address so the router gets confused and returns the session cookie to the wrong user&lt;/p&gt;
&lt;p&gt;The second scenario is a misconfiguration in a router, and is by far much less frequent than the first scenario.&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1572598</link><pubDate>Thu, 01 Feb 2007 15:43:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1572598</guid><dc:creator>payal</dc:creator><description>&lt;p&gt;Hi Tess,&lt;/p&gt;
&lt;p&gt;thanks a lot.. i think i m getting this problem because of second issue because i have already checked first option but session scope is not comming from any cached or static object. &lt;/p&gt;
&lt;p&gt;and if that is the case, i should get the same issue on my other servers. &lt;/p&gt;
&lt;p&gt;Previously for this same site..we are getting above issue i.e. lost of session variable due to appdomain recycles.. that time ur article helped me lot..as we found on live server there are two anti-viruses are running and causing the problem.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1966310</link><pubDate>Tue, 27 Mar 2007 20:58:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1966310</guid><dc:creator>BorisL</dc:creator><description>&lt;p&gt;Hi Tess,&lt;/p&gt;
&lt;p&gt;We are getting the same problem as JasonBSteele:&lt;/p&gt;
&lt;p&gt;Event code: 4005 &lt;/p&gt;
&lt;p&gt;Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;/p&gt;
&lt;p&gt;I have a question about this: I have FormsAuthentication enabled, so shouldn't the ticket expiration (the cookie) be handled regularly by FormsAuthentication subsystem? &lt;/p&gt;
&lt;p&gt;We have this problem only on IIS5, it can not be reproduced on IIS6 :-(&lt;/p&gt;
&lt;p&gt;Any suggestions would be greatly appreciated...&lt;/p&gt;
&lt;p&gt;Boris&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1992818</link><pubDate>Fri, 30 Mar 2007 09:52:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1992818</guid><dc:creator>Jethro</dc:creator><description>&lt;p&gt;Hi, there are several Apps in IIS 6.0 on Windows 2003, the config is:&lt;/p&gt;
&lt;p&gt;&amp;lt;authentication mode=&amp;quot;Forms&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;forms name=&amp;quot;QuotationCollector&amp;quot; loginUrl=&amp;quot;Authentication.asmx&amp;quot; protection=&amp;quot;All&amp;quot; timeout=&amp;quot;20&amp;quot; slidingExpiration=&amp;quot;true&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;credentials passwordFormat=&amp;quot;SHA1&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;					&amp;lt;user name=&amp;quot;System&amp;quot; password=&amp;quot;7C222FB2927D828AF22F592134E8932480637C0D&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;					&amp;lt;user name=&amp;quot;Feader1&amp;quot; password=&amp;quot;7C222FB2927D828AF22F592134E8932480637C0D&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;/credentials&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;/forms&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/authentication&amp;gt;&lt;/p&gt;
&lt;p&gt;the others are :&lt;/p&gt;
&lt;p&gt;authentication mode=&amp;quot;Forms&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;forms loginUrl=&amp;quot;Login.aspx&amp;quot; name=&amp;quot;TradingConsole&amp;quot; protection=&amp;quot;All&amp;quot; timeout=&amp;quot;15&amp;quot; slidingExpiration=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/forms&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;/authentication&amp;gt;&lt;/p&gt;
&lt;p&gt;Now, only the first app log event every minute as:&lt;/p&gt;
&lt;p&gt;Event code: 4005 &lt;/p&gt;
&lt;p&gt;Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#1992956</link><pubDate>Fri, 30 Mar 2007 10:56:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1992956</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;I think the most common reason for this error is that the appdomain restarted, and since you are posting these questsions in connection to a post about appdomain recycling does that mean that you do see in perfmon that the appdomain has recycled?&lt;/p&gt;
&lt;p&gt;If it has, add logging to see why it recycled&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2041713</link><pubDate>Fri, 06 Apr 2007 22:48:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2041713</guid><dc:creator>Boris</dc:creator><description>&lt;p&gt;Hi Tess&lt;/p&gt;
&lt;p&gt;I solved the &amp;quot;Forms authentication failed for the request. Reason: The ticket supplied has expired. &amp;quot; problem by providing permanent valudation and decription keys in machine.config. The problem was caused by generation of new random validation/decription keys when appdomain restarted...&lt;/p&gt;
&lt;p&gt;Here the article about how to create keys...&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312906"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312906&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Boris&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2068807</link><pubDate>Tue, 10 Apr 2007 09:30:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2068807</guid><dc:creator>Glenn Slayden</dc:creator><description>&lt;p&gt;Wow, after 8 hours of debugging the buck stopped here. You hit the nail on the head with this great article. In my case (ASP .NET 2.0, C#), a static generic List object was sometimes getting reinitialized across a System.Diagnostics.Process.Start() spawn of Perl.exe. As you point out, the AppDomain is being unloaded because Perl changes various files in a subdirectory.&lt;/p&gt;
&lt;p&gt;I haven't tried this yet, but would a fix be to create a different application for those subdirectories (using IIS manager), thus excluding them from the main AppDomain and its notifications?&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2069118</link><pubDate>Tue, 10 Apr 2007 10:12:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2069118</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi Glenn,&lt;/p&gt;
&lt;p&gt;I'm happy that the post helped:) &amp;nbsp;The optimal setup would be if the files that were updated weren't in the application path at all, but i suspect that they are supposed to be accessible from the web so in that case if you set the subdir up as an application, only that application would restart when the files are updated and a new request comes in to that application which would save the main app from restarting. &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2078952</link><pubDate>Wed, 11 Apr 2007 02:47:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2078952</guid><dc:creator>Glenn Slayden</dc:creator><description>&lt;p&gt;Tess, thanks for your reply.&lt;/p&gt;
&lt;p&gt;Unfortunately, my idea does not work; creating an application for the subdirectory does not exclude it from the parent application's FCN (file change notification).&lt;/p&gt;
&lt;p&gt;There are not many other options. It may be possible to create a directory junction (as discussed by Toddca) but from my reading it seems like they are somewhat delicate.&lt;/p&gt;
&lt;p&gt;What does seem to work--and is not delicate enough--is setting &amp;lt;httpRuntime waitChangeNotification=&amp;quot;2147483647&amp;quot; maxWaitChangeNotification=&amp;quot;2147483647&amp;quot; /&amp;gt; in the site's web.config, but then we lose the whole auto-deployment feature, and it becomes difficult to re-JIT the site without a full-blown manual 'iisreset'. With this option, to force the AppDomain to reinitialize I tried having a button on the site which causes it to call HttpRuntime.UnloadAppDomain() or AppDomain.Unload(AppDomain.CurrentDomain) on itself (even from a QueueUserWorkItem), but had little success. I can't see a way to do it from the IIS Manager snap-in, either.&lt;/p&gt;
&lt;p&gt;Glenn&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2081116</link><pubDate>Wed, 11 Apr 2007 06:35:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2081116</guid><dc:creator>Glenn Slayden</dc:creator><description>&lt;p&gt;Another thing to note is that the delays imposed by waitChangeNotification and maxWaitChangeNotification are in effect even for explicit calls to HttpRuntime.UnloadAppDomain(). In fact, the function blocks for the entire wait duration!&lt;/p&gt;
&lt;p&gt;This is not what I would expect. The result is that when using a large delay value, the function is not usable and there's little chance of recycling your AppDomain.&lt;/p&gt;
&lt;p&gt;I confirmed this result with varying delay wait values 'w': the the call to UnloadAppDomain() blocked for 'w' seconds, after which the AppDomain was cheerfully unloaded.&lt;/p&gt;
&lt;p&gt;Glenn&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2084923</link><pubDate>Wed, 11 Apr 2007 14:17:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2084923</guid><dc:creator>Colin Hale</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Back in Feb, there was a post from Payal. &amp;nbsp;He was experiencing a problem whereby users were getting other users session variables.&lt;/p&gt;
&lt;p&gt;I am having the same problem under .net1.1&lt;/p&gt;
&lt;p&gt;Changing the software to 'cookieless' - to display the sessionID in the url, we can see that the sessionIDs are changing to someone else's.&lt;/p&gt;
&lt;p&gt;In your response, you give 2 possible scenarios&lt;/p&gt;
&lt;p&gt;I think I can rule the first one out, as no shared components are involved No reused or 'cached' components are being stored in the session, only a simple class structure defined within the asp.net project, &amp;nbsp;instantiated as an object and stored in the session within an ascx.vb file.&lt;/p&gt;
&lt;p&gt;As for scenario #2, what tool(s) would you recommend to determine the ip address of the incoming request?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Colin.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2112954</link><pubDate>Fri, 13 Apr 2007 13:23:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2112954</guid><dc:creator>Colin Hale</dc:creator><description>&lt;p&gt;Just for closure:&lt;/p&gt;
&lt;p&gt;We had to contact Microsoft. &amp;nbsp;They gave 3 or 4 scenarios, but it turned out that one of our aspx pages had the directive &amp;lt;%@ OutputCache %&amp;gt;. &amp;nbsp;This caused the page to be cached, hence the second user will get the first users page (and details taken from the first session).&lt;/p&gt;
&lt;p&gt;What was weird (and a bit of a red fish) was the 2nd user getting the 1st users session ID.&lt;/p&gt;
&lt;p&gt;After removing this directive - it all started to work correctly.&lt;/p&gt;
&lt;p&gt;Colin.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2182152</link><pubDate>Thu, 19 Apr 2007 02:09:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2182152</guid><dc:creator>Glenn Slayden</dc:creator><description>&lt;p&gt;And for closure on mine:&lt;/p&gt;
&lt;p&gt;It looks like the directory junction approach, while bizarre, will work for my application and I will eventually have to use it.&lt;/p&gt;
&lt;p&gt;For now though, I have been testing &amp;lt;httpRuntime waitChangeNotification=&amp;quot;2147483647&amp;quot; maxWaitChangeNotification=&amp;quot;2147483647&amp;quot; /&amp;gt; on the production site for a week and this works as well, with the caveat that this disables auto-deploy and you must do a manual iisreset to force updating or re-JIT.&lt;/p&gt;
&lt;p&gt;Glenn&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2237101</link><pubDate>Mon, 23 Apr 2007 01:18:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2237101</guid><dc:creator>joe</dc:creator><description>&lt;p&gt;Hi There,&lt;/p&gt;
&lt;p&gt;I am having a similar problem, what other possible causes did MS give you.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2269951</link><pubDate>Wed, 25 Apr 2007 13:00:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2269951</guid><dc:creator>Colin Hale</dc:creator><description>&lt;p&gt;MS response was as follows:&lt;/p&gt;
&lt;p&gt;Everything we have checked so far results to be fine, so there is only one possibility left which can lead to this problem: caching.&lt;/p&gt;
&lt;p&gt;We are probably sending to the second client a page (or data) being cached by the first client. &lt;/p&gt;
&lt;p&gt;There are 3 way this could happen:&lt;/p&gt;
&lt;p&gt;1) using OutputCache on those pages: please, open the page directive section of all the pages in relation with the problem and ensure you are not using OutputCache.&lt;/p&gt;
&lt;p&gt;2) caching sensitive data using the Cache[] object. Please, make sure you aren’t&lt;/p&gt;
&lt;p&gt;3) having a proxy/firewall between server and clients which caches pages: please make sure this does not happen. Could you try to reproduce the problem using 2 different boxes as client, both directly connected to the server (no proxy between)?&lt;/p&gt;
&lt;p&gt;Hope that helps, &lt;/p&gt;
&lt;p&gt;Colin. &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2304226</link><pubDate>Sat, 28 Apr 2007 01:04:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2304226</guid><dc:creator>mkraley</dc:creator><description>&lt;p&gt;I too am having mysterious &amp;quot;Reason: Configuration Changed&amp;quot; application restarts. Filemon confirms that there are no writes taking place either in the application tree or in the Framework folder tree. The first mention of anything relevant in Filemon is a CLOSE of web.config, which I suspect is just the beginning of the restart, not the cause.&lt;/p&gt;
&lt;p&gt;Has anyone made progress on deducing why this happens?&lt;/p&gt;
&lt;p&gt;...Mike&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2477112</link><pubDate>Tue, 08 May 2007 12:23:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2477112</guid><dc:creator>Colin Hale</dc:creator><description>&lt;p&gt;Have you tried excluding the virt folder from any anti-virus s/w?&lt;/p&gt;</description></item><item><title>Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#2970850</link><pubDate>Tue, 29 May 2007 19:03:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2970850</guid><dc:creator>&lt;dw:daniel_walzenbach runat="server" /&gt;</dc:creator><description>&lt;p&gt;In ASP.NET Case Study: Lost session variables and appdomain recycles beschreibt Tess was passiert wenn&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#3326785</link><pubDate>Sat, 16 Jun 2007 04:49:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3326785</guid><dc:creator>Minnie</dc:creator><description>&lt;p&gt;I have a question. How can we capture session timeout in IIS/ASP.NET?&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#3533586</link><pubDate>Tue, 26 Jun 2007 04:14:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3533586</guid><dc:creator>Salman Banani</dc:creator><description>&lt;p&gt;Great article, really helped. &amp;nbsp;My antivirus was casuing my appdomain to recycle.&lt;/p&gt;
&lt;p&gt;Thanks man.&lt;/p&gt;</description></item><item><title>ASP.NET Hang scenario: Kernel Debugging for Dummies</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#4587970</link><pubDate>Mon, 27 Aug 2007 10:52:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4587970</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;A local radio show has started giving out cookie points to their interviewees for personal development,&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#5291090</link><pubDate>Fri, 05 Oct 2007 13:47:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5291090</guid><dc:creator>Rob Kent</dc:creator><description>&lt;p&gt;Using ASP.NET 2, we're seeing Appdomain recycles pretty frequently with a low load - just a few users on our test system. The reason given in the eventlog is 'HostingEnvironment caused shutdown', which looks to me like a memory issue.&lt;/p&gt;
&lt;p&gt;Looking at memory, we see big chunks being taken every time another user logs in and the wp process gets to 2.5G, at which point I guess it decides to recycle itself. &lt;/p&gt;
&lt;p&gt;I can't find any reason for that amount of memory being used and on my development laptop, that doesn't happen. We are using Ajax, and WCF to communicate with the data layer. Does anyone have any experience of that combination and whether there are known performance/memory issues.&lt;/p&gt;
&lt;p&gt;Cheers, Rob&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#5361878</link><pubDate>Mon, 08 Oct 2007 15:49:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5361878</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Since you have a pretty well defined scenario where you see memory going up everytime someone logs in, an idea would be to &lt;/p&gt;
&lt;p&gt;attach windbg or visual studio for that matter, &lt;/p&gt;
&lt;p&gt;load up sos, &lt;/p&gt;
&lt;p&gt;do !dumpheap -stat just before the log in&lt;/p&gt;
&lt;p&gt;hit g to go&lt;/p&gt;
&lt;p&gt;!dumpheap -stat after the log in &lt;/p&gt;
&lt;p&gt;compare the outputs to see what types of objects have increased the most and investigate those.&lt;/p&gt;
&lt;p&gt;Alternatively you could hook up CLR Profiler and look there at what objects have been instantiated while you were logging in.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Tess&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#5393586</link><pubDate>Wed, 10 Oct 2007 23:28:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5393586</guid><dc:creator>George</dc:creator><description>&lt;p&gt;We've been experiencing this same issue for quite some time now. Thanks to your blog entry here, I was able to confirm that it is indeed a configuration change which causes our worker process to recycle. Specifically, I see the &amp;quot;Application is shutting down. Reason: Configuration changed.&amp;quot; message in the event log now.&lt;/p&gt;
&lt;p&gt;I figured it would be fairly simple to track down the culprit (indexing service is off, and virus scanner is explicitly set to ignore any directories that contain config files), but that has proven to not be the case. I left FileMon running overnight (filtering on *.config) and waited until the worker process recycled. Unfortunately, it looks as if nothing accessed (read or write) a config file immediately before the recycle occured. The sequence of events is as follows:&lt;/p&gt;
&lt;p&gt;Event code: 1002 &lt;/p&gt;
&lt;p&gt;Event message: Application is shutting down. Reason: Configuration changed. &lt;/p&gt;
&lt;p&gt;Event time: 10/4/2007 5:01:27 PM &lt;/p&gt;
&lt;p&gt;Event time (UTC): 10/4/2007 9:01:27 PM &lt;/p&gt;
&lt;p&gt;Event ID: de5016e0e27944dc82f644b975c01d38 &lt;/p&gt;
&lt;p&gt;Event sequence: 140208 &lt;/p&gt;
&lt;p&gt;Event occurrence: 1 &lt;/p&gt;
&lt;p&gt;Event detail code: 50004 &lt;/p&gt;
&lt;p&gt;Process information: &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Process ID: 6052 &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Process name: w3wp.exe &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Account name: NT AUTHORITY\NETWORK SERVICE &lt;/p&gt;
&lt;p&gt;and from the FileMon log:&lt;/p&gt;
&lt;p&gt;5:00:24.164 PM	w3wp.exe:6052	FASTIO_QUERY_OPEN	D:\AppRoot\main\developments\web.config	NOT FOUND	Attributes: Error	&lt;/p&gt;
&lt;p&gt;5:01:13.917 PM	w3wp.exe:6052	FASTIO_QUERY_OPEN	D:\AppRoot\main\reports\web.config	NOT FOUND	Attributes: Error	&lt;/p&gt;
&lt;p&gt;5:01:13.917 PM	w3wp.exe:6052	IRP_MJ_DIRECTORY_CONTROL	D:\AppRoot\main\reports\	NO SUCH FILE	FileBothDirectoryInformation: web.config	&lt;/p&gt;
&lt;p&gt;5:01:13.917 PM	w3wp.exe:6052	FASTIO_QUERY_OPEN	D:\AppRoot\main\reports\web.config	NOT FOUND	Attributes: Error	&lt;/p&gt;
&lt;p&gt;5:01:27.448 PM	w3wp.exe:6052	FASTIO_QUERY_OPEN	C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config	SUCCESS	Attributes: A	&lt;/p&gt;
&lt;p&gt;5:01:27.448 PM	w3wp.exe:6052	IRP_MJ_DIRECTORY_CONTROL	C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\	SUCCESS	&lt;/p&gt;
&lt;p&gt;FileBothDirectoryInformation: machine.config	&lt;/p&gt;
&lt;p&gt;5:01:27.448 PM	w3wp.exe:6052	IRP_MJ_CREATE 	C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config	SUCCESS	Options: Open &amp;nbsp;Access: &lt;/p&gt;
&lt;p&gt;00020000	&lt;/p&gt;
&lt;p&gt;5:01:27.448 PM	w3wp.exe:6052	IRP_MJ_QUERY_SECURITY	C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config	BUFFER OVERFLOW	&lt;/p&gt;
&lt;p&gt;Repeat 1000x as the restart finishes. The curious thing about this is twofold: &lt;/p&gt;
&lt;p&gt;1) FileMon reports the same PID for the worker process before, during, and after the restart. A new process should be spun up after the restart, correct?&lt;/p&gt;
&lt;p&gt;2) There are multiple worker processes running on this machine, but only one ever restarts. This all but rules out global web.confg/machine.config changes.&lt;/p&gt;
&lt;p&gt;Is there anything else other than .config files that ASP.NET considers to be configuration files? Any ideas would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Thanks for your time,&lt;/p&gt;
&lt;p&gt;George&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#5459703</link><pubDate>Mon, 15 Oct 2007 11:02:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5459703</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi George,&lt;/p&gt;
&lt;p&gt;Not sure why the config changes are being reported, but to answer your questions&lt;/p&gt;
&lt;p&gt;1) The workerprocess doesnt restart only the application domain inside it so the PID should stay the same. &amp;nbsp;It will only change if the whole process restarts. &lt;/p&gt;
&lt;p&gt;2) No, only .config files are considered configuration files.&lt;/p&gt;
&lt;p&gt;I do seem to recall some issues reported in the early stages of 2.0 with false config restarts because of exceptions under certain conditions but i dont recall the exact details. &amp;nbsp;You might just want to check that you are on the latest rollups/service packs for the framework if you haven't checked already.&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#5631425</link><pubDate>Tue, 23 Oct 2007 23:08:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5631425</guid><dc:creator>George</dc:creator><description>&lt;p&gt;Hi Tess,&lt;/p&gt;
&lt;p&gt;Thanks for the clarification. &lt;/p&gt;
&lt;p&gt;It looks like the framework is indeed up to date. The only other thing I can think of is that we recently began writing data to a directory inside of the application's directory tree, although Filemon confirms there are no writes in the moments leading up to the recycle. Maybe this is tangentially related to the overwhelming changes (&lt;a rel="nofollow" target="_new" href="http://support.microsoft.com/?id=913297"&gt;http://support.microsoft.com/?id=913297&lt;/a&gt;) issue?&lt;/p&gt;
&lt;p&gt;I'll keep after it and post back here if I discover anything new.&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;George&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#6688689</link><pubDate>Fri, 07 Dec 2007 07:27:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6688689</guid><dc:creator>Jethro</dc:creator><description>&lt;p&gt;the perfmon counter ASP.NET v…/Application Restarts always ==0 for 2 hours, BUT the eventLog is full of this event, see Event occurrence: 36401 ! &amp;nbsp; Help ！！！&lt;/p&gt;
&lt;p&gt;Event code: 4005 &lt;/p&gt;
&lt;p&gt;Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;/p&gt;
&lt;p&gt;Event time: 12/7/2007 11:17:06 AM &lt;/p&gt;
&lt;p&gt;Event time (UTC): 12/7/2007 4:17:06 AM &lt;/p&gt;
&lt;p&gt;Event ID: 57a0de50fe674a3fb5ab61c36938c1a7 &lt;/p&gt;
&lt;p&gt;Event sequence: 85310 &lt;/p&gt;
&lt;p&gt;Event occurrence: 36401 &lt;/p&gt;
&lt;p&gt;Event detail code: 50202 &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8203150</link><pubDate>Fri, 14 Mar 2008 16:38:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8203150</guid><dc:creator>salsam</dc:creator><description>&lt;p&gt;I have also facing same problem. &amp;nbsp;during normal execution of the site my session information getting lost. &lt;/p&gt;
&lt;p&gt;Event log is full of such errors.&lt;/p&gt;
&lt;p&gt;Event code: 4005 &lt;/p&gt;
&lt;p&gt;Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;/p&gt;
&lt;p&gt;Event time: 14/03/2008 13:19:26 &lt;/p&gt;
&lt;p&gt;Event time (UTC): 14/03/2008 13:19:26 &lt;/p&gt;
&lt;p&gt;Event ID: d9f0333c2eed46e0b0207da69d2ea70e &lt;/p&gt;
&lt;p&gt;Event sequence: 154 &lt;/p&gt;
&lt;p&gt;Event occurrence: 5 &lt;/p&gt;
&lt;p&gt;Event detail code: 50202 &lt;/p&gt;
&lt;p&gt;If some on find solution of this problem please do post here.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8203242</link><pubDate>Fri, 14 Mar 2008 16:43:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8203242</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Have you gone through and verified if your appdomain is recycling (in performance monitor) that is the most common case for lost session variables. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you follow hte article and log application restarts in the eventlog? &amp;nbsp;The solution will depend on why the application/appdomain is restarting... &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8203598</link><pubDate>Fri, 14 Mar 2008 17:03:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8203598</guid><dc:creator>salsam</dc:creator><description>&lt;p&gt;If you mean, copying 'Application Lifetime Events ' in web.config file. then yes i have copied it to webconfig but didnt got any of known reason as yet, like it is being happened becos of 'Configuration changed.'&lt;/p&gt;
&lt;p&gt;do i have to restart webserver in order to make below mention changes come in to effect.&lt;/p&gt;
&lt;p&gt;&amp;lt;add name=&amp;quot;Application Lifetime Events Default&amp;quot; eventName=&amp;quot;Application Lifetime Events&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;provider=&amp;quot;EventLogProvider&amp;quot; profile=&amp;quot;Default&amp;quot; minInstances=&amp;quot;1&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;maxLimit=&amp;quot;Infinite&amp;quot; minInterval=&amp;quot;00:01:00&amp;quot; custom=&amp;quot;&amp;quot; /&amp;gt;&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8204307</link><pubDate>Fri, 14 Mar 2008 17:45:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8204307</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;No you shouldnt have to, &amp;nbsp;the best thing is probably to contact support and have someone look at it in more detail&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8204597</link><pubDate>Fri, 14 Mar 2008 18:05:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8204597</guid><dc:creator>salsam</dc:creator><description>&lt;p&gt;&amp;lt;add name=&amp;quot;Application Lifetime Events Default&amp;quot; eventName=&amp;quot;Application Lifetime Events&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;provider=&amp;quot;EventLogProvider&amp;quot; profile=&amp;quot;Default&amp;quot; minInstances=&amp;quot;1&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;maxLimit=&amp;quot;Infinite&amp;quot; minInterval=&amp;quot;00:01:00&amp;quot; custom=&amp;quot;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Even after adding this , still i m getting this in &amp;nbsp;event log. &lt;/p&gt;
&lt;p&gt;Event code: 4005 &lt;/p&gt;
&lt;p&gt;Event message: Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;/p&gt;
&lt;p&gt;Event time: 14/03/2008 13:19:26 &lt;/p&gt;
&lt;p&gt;Event time (UTC): 14/03/2008 13:19:26 &lt;/p&gt;
&lt;p&gt;Event ID: d9f0333c2eed46e0b0207da69d2ea70e &lt;/p&gt;
&lt;p&gt;Event sequence: 154 &lt;/p&gt;
&lt;p&gt;Event occurrence: 5 &lt;/p&gt;
&lt;p&gt;Event detail code: 50202 &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8298256</link><pubDate>Tue, 18 Mar 2008 02:36:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8298256</guid><dc:creator>salsam</dc:creator><description>&lt;p&gt;hi Tess,&lt;/p&gt;
&lt;p&gt;it is now confirmed that in my case appdomain is not recycling. beoc since one day i have received even single event of appdomain recycle. so problem is somewhere else. i have also update machine.cofig file with custom generated keys but still having same errors in evenlog. &lt;/p&gt;
&lt;p&gt;please suggest some solution&lt;/p&gt;
&lt;p&gt;thanks &lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8308268</link><pubDate>Tue, 18 Mar 2008 10:20:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8308268</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;I would have to look at it in a lot more detail to see what is going on and unfortunately I can't really do that in this blog setting so the best is probably to contact support and have someone look at it for you. &amp;nbsp;sorry:(&lt;/p&gt;
</description></item><item><title>My presentation on Troubleshooting ASP.NET production issues at Developer Summit 2008</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8379645</link><pubDate>Fri, 11 Apr 2008 14:24:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8379645</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;The purpose of my presentation was to show some common pitfalls and of course to show off windbg and&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8472175</link><pubDate>Thu, 08 May 2008 17:29:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8472175</guid><dc:creator>Salsam</dc:creator><description>&lt;p&gt;Hi guys,&lt;/p&gt;
&lt;p&gt;I was working on the issue where event viewer showing the log &amp;quot;Forms authentication failed for the request. Reason: The ticket supplied has expired. &lt;/p&gt;
&lt;p&gt;&amp;quot;. &lt;/p&gt;
&lt;p&gt;Finally able to get to the roots of this message. here what it was happening to me.&lt;/p&gt;
&lt;p&gt;I was working on web application which is using Form Authentication and Sessions to store the user specific profiles.&lt;/p&gt;
&lt;p&gt;Here is my setting in web.config file. &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;sessionState timeout=&amp;quot;60&amp;quot; mode=&amp;quot;InProc&amp;quot; cookieless=&amp;quot;false&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;authentication mode=&amp;quot;Forms&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;forms loginUrl=&amp;quot;Pages/Login.aspx&amp;quot; defaultUrl=&amp;quot;.\Pages\Default.aspx&amp;quot; timeout =&amp;quot;60&amp;quot; slidingExpiration =&amp;quot;true&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;/forms&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;/authentication&amp;gt;&lt;/p&gt;
&lt;p&gt;Now problem was before i didn't had form authentication timeout, which had default of 30 mins. So when &amp;nbsp;request is made after being idle for 30 mins, Form authentication was throwing the user back to login page. beacuse after 30 mins the ticket supplied with the request &amp;nbsp;gone expired. and this also logged warrning that user was thrown out beacuse of expire ticket passed. &lt;/p&gt;
&lt;p&gt;other problem i was having that Form Authentication was unable to redirect the user back to login page and end up with page no found error. reason for that was, missing &amp;lt;authorization&amp;gt; tags. &lt;/p&gt;
&lt;p&gt;ForAuthentication requires deny &amp;nbsp;anonymous access in the Authorization tags in order to redirect the user back to login page in case if authorization failed or timeout.&lt;/p&gt;
&lt;p&gt;So in order to fix these issues i have stick in the Authorization tags. and along with that, i have also set the Form Authentication timeout same as session timeout. &lt;/p&gt;
&lt;p&gt;But this still give the warraning in Event viewer beacuse if session and Form Autentication Cookie is expiring at same time. and user makes any request after the timout first things which triggered is Form Authentication and it will throw the user to login page and log the event in Event viewer. &lt;/p&gt;
&lt;p&gt;To do &amp;nbsp;quick fix i have increased Form Autentication timeout to 240 mins by leaving the session timout 60 just to make session timout before Form Authentication timeout. So when session timeout after 60 mins Code is already there to take the user back to login page so user can re loggin.&lt;/p&gt;
&lt;p&gt;If any one has batter solution to this problem, please do share it &lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8499570</link><pubDate>Tue, 13 May 2008 12:05:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8499570</guid><dc:creator>Adam </dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just thought I would share another scenario I came across, not that its because of application pool recycling but because it looked like it at first.&lt;/p&gt;
&lt;p&gt;I had an application that kept losing its session state and the actual reason was I had a maximum number of worker processes allowed set to 5. &lt;/p&gt;
&lt;p&gt;Because the application used inproc session state the session state was lost each time it jumped a worker process. The setting is in the properties of the Application Pool.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8499587</link><pubDate>Tue, 13 May 2008 12:12:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8499587</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Absolutely, &amp;nbsp;the same is of course true for web farms. &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502032</link><pubDate>Wed, 14 May 2008 01:45:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502032</guid><dc:creator>Simone Busoli</dc:creator><description>&lt;p&gt;Hi Tess,&lt;/p&gt;
&lt;p&gt;I was wondering why the waitChangeNotification and maxWaitChangeNotification settings support has been dropped in IIS 7. It was the only mechanism available for hot swapping applications on the fly.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502783</link><pubDate>Wed, 14 May 2008 08:55:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502783</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;I honestly had no clue that that was the case, and it surprises me, because that is a framework setting, not an IIS setting.&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502838</link><pubDate>Wed, 14 May 2008 10:05:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502838</guid><dc:creator>Simone Busoli</dc:creator><description>&lt;p&gt;Tess, look here, point 25.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://mvolo.com/blogs/serverside/archive/2007/12/08/IIS-7.0-Breaking-Changes-ASP.NET-2.0-applications-Integrated-mode.aspx"&gt;http://mvolo.com/blogs/serverside/archive/2007/12/08/IIS-7.0-Breaking-Changes-ASP.NET-2.0-applications-Integrated-mode.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502843</link><pubDate>Wed, 14 May 2008 10:08:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502843</guid><dc:creator>Simone Busoli</dc:creator><description>&lt;p&gt;Oh, and obviously, this occurs in the Integrated Pipeline mode only.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502856</link><pubDate>Wed, 14 May 2008 10:24:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502856</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;I would have to look at this in more detail and unfortunately I do not have an IIS 7 machine set up at the moment, but the bullet item says:&lt;/p&gt;
&lt;p&gt;__________&lt;/p&gt;
&lt;p&gt;25) IIS 7.0 always restarts ASP.NET applications when changes are made to the application’s root web.config file. &amp;nbsp;Because of this, waitChangeNotification and maxWaitChangeNotification attributes have no effect.&lt;/p&gt;
&lt;p&gt;IIS 7.0 monitors changes to the web.config files as well, and cause the ASP.NET application corresponding to this file to be restarted without regard to the ASP.NET change notification settings including the waitChangeNotification and maxWaitChangeNotification attributes in the system.web/httpRuntime configuration sections. &lt;/p&gt;
&lt;p&gt;_____________&lt;/p&gt;
&lt;p&gt;My comments: Web.config changes have always been monitored and do restart the application domain. &amp;nbsp;Off the bat I can't see how this disables waitChangeNotifications other than for changes in web.config. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;One of the biggest reasons you would use them is to be able to update multiple dlls at a time without restarts, and from this comment I am not sure that that would change. &amp;nbsp;The only thing that this comment seems to suggest is that waitChangeNotifications are not honored for web.config changes.&lt;/p&gt;
&lt;p&gt;I might be wrong though as I haven't tested it personally.&lt;/p&gt;
</description></item><item><title>ASP.NET Performance issue: Large number of application restarts due to virus scanning</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502878</link><pubDate>Wed, 14 May 2008 10:44:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502878</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;Issues caused by frequent application restarts are pretty common. If you are interested in what causes&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8502980</link><pubDate>Wed, 14 May 2008 12:44:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8502980</guid><dc:creator>simone_b</dc:creator><description>&lt;p&gt;Yes, it happens to ignore the settings only when changes to the web.config file occur, but it represents a major issue since replacing the web.config file is exactly what happens when doing hot swap of applications.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8503018</link><pubDate>Wed, 14 May 2008 14:06:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8503018</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Still that would only mean one appdomain recycle, which is what you would see anyways with the maxWaitChangeNotification, so I am not sure I understand the issue... &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8503030</link><pubDate>Wed, 14 May 2008 14:21:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8503030</guid><dc:creator>simone_b</dc:creator><description>&lt;p&gt;This is the issue, supposing that I don't set any waitChangeNotification or maxWaitChangeNotification:&lt;/p&gt;
&lt;p&gt;I trigger a batch update, using robocopy for example, which takes all files from the source directory and copies them over the files in the old directory, where the application is running.&lt;/p&gt;
&lt;p&gt;1. some - but not all - files from the source bin folder are copied to the destination - the application restarts immediately&lt;/p&gt;
&lt;p&gt;2. the web.config file is copied - the application restarts immediately&lt;/p&gt;
&lt;p&gt;3. the rest of the content of the bin folder is copied, the application restarts again.&lt;/p&gt;
&lt;p&gt;This is the issue, supposing that I set waitChangeNotification = 10 and maxWaitChangeNotification to a big value (meaningless in this example):&lt;/p&gt;
&lt;p&gt;1. some - but not all - files from the source bin folder are copied to the destination - this takes much less than 10 seconds - the application doesn't restart&lt;/p&gt;
&lt;p&gt;2. the web.config file is copied - the application restarts immediately&lt;/p&gt;
&lt;p&gt;3. the rest of the content of the bin folder is copied, the application waits 10 seconds from the last copy then restarts.&lt;/p&gt;
&lt;p&gt;Here we have 2 restarts, one of them probably error prone, since not all assemblies were copied and might be incompatible to each other.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8503042</link><pubDate>Wed, 14 May 2008 14:36:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8503042</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;ok, then you would either have to do the robocopy first, and then copy the web.config &amp;nbsp; or do the update when the site is not live... &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8503053</link><pubDate>Wed, 14 May 2008 14:54:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8503053</guid><dc:creator>simone_b</dc:creator><description>&lt;p&gt;Yes, that's the workaround I came up with, but that's not as optimal as it was before, and mostly I can't see the reason why it should have been changed in IIS7, it worked so well in the previous versions..&lt;/p&gt;</description></item><item><title>The 21 most popular blog posts</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8528128</link><pubDate>Wed, 21 May 2008 16:45:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8528128</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;I started this blog 2.5 years ago today, mostly because I felt that the same types of issues came up&lt;/p&gt;
</description></item><item><title>The root cause for application performance problems might seem to be totally unrelated</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8549481</link><pubDate>Sun, 25 May 2008 01:12:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8549481</guid><dc:creator>Green Dragon's Lair</dc:creator><description>&lt;p&gt;I just read a post on If broken it is, fix it you should , where he&amp;amp;#39;s debugging a performance problem&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8879693</link><pubDate>Tue, 19 Aug 2008 23:32:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8879693</guid><dc:creator>Mike Driest</dc:creator><description>&lt;p&gt;Hello Tess,&lt;/p&gt;
&lt;p&gt;On Thursday, February 01, 2007 7:27 AM you wrote:&lt;/p&gt;
&lt;p&gt;-------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Hi Payal,&lt;/p&gt;
&lt;p&gt;Pretty much every time I have seen this it has been one of two things.&lt;/p&gt;
&lt;p&gt;1. The thing that is being put in session scope is comming from a cached or static object of some sort without proper locking mechanisms so while you are reading, some other thread/user has already written new data to it. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. A router or load balancer is used and the users come from the same ISP getting the same IP address so the router gets confused and returns the session cookie to the wrong user&lt;/p&gt;
&lt;p&gt;The second scenario is a misconfiguration in a router, and is by far much less frequent than the first scenario.&lt;/p&gt;
&lt;p&gt;-------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;We have a similar issue with one of our Internet facing ASP.NET 2.0 Applications with only 1 customer/computer where we're seeing 3 Public IP Addresses hit our web servers (2 node with NLB) in a matter of 3.5 minutes. &amp;nbsp;These 3 Public IP Addresses from the Client are in the same Subnet and are literly .101, .102 and .103. &amp;nbsp;Our ASP.NET App uses .NET Forms Authentication and I think it's possible that the session is being responded to via the Wrong Client Public IP Address. &amp;nbsp;The user is logged out shortly after they login to the application and try to execute a Search.&lt;/p&gt;
&lt;p&gt;Our code barely uses caching and other customers/users don't have this issue from other corporate networks, computers or ISPs. &amp;nbsp;We've used the user's credentials on PCs on the Public Internet and our Corporate computers successfully without errors or being logged out.&lt;/p&gt;
&lt;p&gt;Would you agree that the issue lies within the client/customer network infrastructure (firewalls, routers, etc)?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Mike Driest&lt;/p&gt;</description></item><item><title>Questions on application domains, application pools and unhandled exceptions</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8880897</link><pubDate>Wed, 20 Aug 2008 11:18:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8880897</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;I got an email with some questions around application domains, application pools and unhandled exceptions&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8957994</link><pubDate>Fri, 19 Sep 2008 03:54:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8957994</guid><dc:creator>Craig Hubbard</dc:creator><description>&lt;p&gt;Thanks for this post, the recycling issue has become quite an issue for our DotNetNuke implemenations of recent times (Sept 2008) and this post will help me to investigate further - great stuff!&lt;/p&gt;</description></item><item><title>Common reasons for the session loss issue in ASP.NET applications</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#8968816</link><pubDate>Mon, 29 Sep 2008 15:54:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8968816</guid><dc:creator>Akshay's Weblog</dc:creator><description>&lt;p&gt;I have handled a lot of session related issues till now; I felt the need to key in a few checkpoints&lt;/p&gt;
</description></item><item><title>ASP.NET v2.0 - AppDomain recycles, more common than before</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9011104</link><pubDate>Wed, 22 Oct 2008 16:59:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9011104</guid><dc:creator>Scott Forsyth's Blog</dc:creator><description>&lt;p&gt;I stumbled across a very interesting find yesterday morning and Todd Carter confirmed it by sending a&lt;/p&gt;
</description></item><item><title>Troubleshooting appdomain restarts and other issues with ETW tracing</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9048254</link><pubDate>Thu, 06 Nov 2008 13:33:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9048254</guid><dc:creator>If broken it is, fix it you should</dc:creator><description>&lt;p&gt;You learn something new every day… I was working on an issue with appdomain restarts caused by page re-compilations&lt;/p&gt;
</description></item><item><title>[ASP.NET]Good reference about troubleshooting ASP.NET application restart problem</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9390053</link><pubDate>Mon, 02 Feb 2009 12:17:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9390053</guid><dc:creator>Steven Cheng's MSDN Notes</dc:creator><description>&lt;p&gt;Application restart is a common issue in ASP.NET web application. Here is a very good blog entry providing&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9427343</link><pubDate>Tue, 17 Feb 2009 12:29:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9427343</guid><dc:creator>Måns Tånneryd</dc:creator><description>&lt;p&gt;Nice post! But, I have a problem with app domain restarts that does not seem to be covered in your post. My web application runs smoothly on a win2003 server in iis 6 but when I deployed it on a win2008 server with iis 7 it started hickupping. After about 60 seconds the appdomain restarts due to &amp;quot;_shutDownMessage=IIS configuration change&amp;quot;. No configuration files have been changed! What is happening though is that the web application is downloading files using ftp on a background thread and placing them in a directory in the app_data folder. I seems unreasonable to me that adding files in the app_data folder should cause the application to restart. Calling an &amp;quot;IIS configuration change&amp;quot; doesn't make any sense to me either!&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;/M&amp;#229;ns&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9427684</link><pubDate>Tue, 17 Feb 2009 18:23:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9427684</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;Hi M&amp;#229;ns,&lt;/p&gt;
&lt;p&gt;Just adding or removing files from there should not restart the app, but if something creates or deletes subfolders, even in the app_data folder then you will see app restarts with the iis config change message&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9573659</link><pubDate>Tue, 28 Apr 2009 17:54:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9573659</guid><dc:creator>Nick Crowther</dc:creator><description>&lt;p&gt;Just fixed my session loss problem (deleting folders in App_Data). Thanks Tess (&amp;amp; M&amp;#229;ns :), useful blog.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9627903</link><pubDate>Tue, 19 May 2009 16:34:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9627903</guid><dc:creator>Siddhartha Bhuyan</dc:creator><description>&lt;p&gt;Nice article Tess. Got a really good understanding about application domain recycling.&lt;/p&gt;
&lt;p&gt;I have been working on a content management website since the past few weeks and my part involves the file handling functionalities.&lt;/p&gt;
&lt;p&gt;Our website actually has to create files, folders etc. in a 3-level hierarchy and also manipulate them based on what the user does.&lt;/p&gt;
&lt;p&gt;While everything was working fine, I kept getting puzzled as to why, everytime a directory was renamed (moved) successfully, I used to lose everything in the session... Debugging only revealed that the session was getting invalidated.&lt;/p&gt;
&lt;p&gt;Only after I read this and Scott Forsyth's article, did the problem become clear to me.&lt;/p&gt;
&lt;p&gt;But I have to admit that this is a sticky problem. And there is no easy way to work around this one.&lt;/p&gt;
&lt;p&gt;Keep writing!&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9822002</link><pubDate>Tue, 07 Jul 2009 12:06:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9822002</guid><dc:creator>Surat Jewpojaroen</dc:creator><description>&lt;p&gt;Thanks for sharing knowledge.&lt;/p&gt;
&lt;p&gt;It's really good article.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9872181</link><pubDate>Mon, 17 Aug 2009 13:33:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9872181</guid><dc:creator>Codru</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I have a question, maybe you could help me. For example, if I try to submit a job (request to the server) after a recycle, my job is lost - no trace of it, no errors are logged, nothing but the information in event viewer that the application has recycled. I understand why this happens, but I would like to know if there's by any chance a way of showing a message to the user that something happened and he will be logged out when submitting the job? Or maybe after he logged back in?&lt;/p&gt;
&lt;p&gt;I cannot see a way of doing this, since all the dlls need to be reloaded, but I thought it's worth a shot to ask :)&lt;/p&gt;
&lt;p&gt;Thanks for the article, it's really good and revealing :)&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9872235</link><pubDate>Mon, 17 Aug 2009 14:43:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9872235</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;i dont really see a way that you could do that... unless perhaps you keep some session variables and detect that they are lost for example&lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9879163</link><pubDate>Fri, 21 Aug 2009 22:37:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9879163</guid><dc:creator>Josh</dc:creator><description>&lt;p&gt;Great article Tess! &amp;nbsp;I have been troubleshooting recycle events for a few days. &amp;nbsp;A combination of virus scanning and mis-used app pools in IIS6 were the trouble. &amp;nbsp;Thanks again.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9896548</link><pubDate>Fri, 18 Sep 2009 01:27:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896548</guid><dc:creator>csaxena</dc:creator><description>&lt;p&gt;Great blog Tess. &amp;nbsp;I have learnt so much from it. &amp;nbsp;I have a few questions. &amp;nbsp;Is there any disadvantage of setting the value for maxWaitChangeNotification and waitChangeNotification to be really high (like 10 hours)? &amp;nbsp;We are seeing a lot of Application restarts in our DotNetNuke environment and we are not making any changes. &amp;nbsp;Is it because the different user controls on different pages are getting compiled and causing the application to be reloaded. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the disadvantage (other than the memory footprint) of increasing numRecompilesBeforeAppRestart to a really high number like 500 or 1000? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks !&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9896689</link><pubDate>Fri, 18 Sep 2009 10:18:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9896689</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;csaxena,&lt;/p&gt;
&lt;p&gt;There are basically two disadvantages. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. Setting numRecompilesBeforeAppRestart to something really high, as you pointed out will mean that you store more copies of stale dlls in the process leading to higher memory usage. &amp;nbsp;That is pretty much the only drawback you will see from that...&lt;/p&gt;
&lt;p&gt;2. setting maxWaitChangeNotification and waitChangeNotification to something really high like 10 hrs means that changes made during that time that require appdomain restarts wont take effect. &amp;nbsp;For example if you modify the web.config, the old settings will be &amp;quot;cached&amp;quot; in that case for 10 hrs and new ones wont take effect until the appdomain is restarted. &amp;nbsp; Same with dll updates. &amp;nbsp;As long as you are aware of that and restart the appdomain manually (by restarting the process) when changes that you need to see go through immediately are made, you'll be ok. &amp;nbsp;In general I really wouldn't recommend setting this higher than 5-10 minutes though... &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9933211</link><pubDate>Sun, 06 Dec 2009 22:15:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9933211</guid><dc:creator>frankosaurus</dc:creator><description>&lt;p&gt;Great article Tess...&lt;/p&gt;
&lt;p&gt;I have an ASP.NET application (in IIS7) where content editors make regular updates to .resx files.&lt;/p&gt;
&lt;p&gt;The problem is that this eventually causes the app domain to recycle.&lt;/p&gt;
&lt;p&gt;With changes to .aspx pages, I can set compilationMode=&amp;quot;never&amp;quot; in web.config and I avoid the problem of excess recompiles.&lt;/p&gt;
&lt;p&gt;Is there a solution for .resx files??&lt;/p&gt;
&lt;p&gt;I would prefer not to set numRecompilesBeforeAppRestart to a high value (or 0) because I don't want to use up RAM -- I need RAM for ASP.NET cache.&lt;/p&gt;</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9933343</link><pubDate>Mon, 07 Dec 2009 10:07:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9933343</guid><dc:creator>Tess</dc:creator><description>&lt;p&gt;unfortunately i dont think there is, but even if there was, that would mean that the updates wouldnt go through until you manually recycle. &amp;nbsp;So given that, perhaps it is better to have the content editors edit to a staging location and copy them all in one go at some point. &lt;/p&gt;
</description></item><item><title>re: ASP.NET Case Study: Lost session variables and appdomain recycles</title><link>http://blogs.msdn.com/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx#9936252</link><pubDate>Sun, 13 Dec 2009 15:49:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9936252</guid><dc:creator>srinivasan</dc:creator><description>&lt;p&gt;''Sec 1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a.dll and b.dll are update to v 1.00.12 &amp;nbsp; &amp;nbsp;- appdomain unload started (any pending requests will finish before it is completely unloaded)&lt;/p&gt;
&lt;p&gt;Sec 2. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Request1 comes in and loads a new appdomain with 2 out of 7 of the dlls updated &lt;/p&gt;
&lt;p&gt;Sec 3. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.dll is updated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- appdomain unload started &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (any pending requests will finish before it is completely unloaded)&lt;/p&gt;
&lt;p&gt;Sec 4. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d.dll is updated&lt;/p&gt;
&lt;p&gt;Sec 5. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Request2 comes in and loads a new appdomain, now with 4 out of 7 dlls updated&lt;/p&gt;
&lt;p&gt;Sec 6. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.dll and f.dll is updated &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - appdomain unload started &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (any pending requests will finish before it is completely unloaded)&lt;/p&gt;
&lt;p&gt;Sec 7. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; f.dll is updated&lt;/p&gt;
&lt;p&gt;Sec 8. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Request3 comes in and loads a new appdomain with all 7 dlls updated&lt;/p&gt;
&lt;p&gt;So, many bad things happened here… &lt;/p&gt;
&lt;p&gt;First off you had 3 application domain restarts while you probably thought you would only have one, because asp.net has no way of knowing when you are done.''&lt;/p&gt;
&lt;p&gt;-----------------------------------&lt;/p&gt;
&lt;p&gt;In the above scenario, don't you feel there are more than 3 appdomain restarts, but you've stated there are 3. Am I getting this wrong ?&lt;/p&gt;</description></item></channel></rss>