Saturday, August 14, 2004
« I Figured We'd Configure the .Config | Main | Thematic Elements »

Talk about frustrating!  Over the past several weeks I've been working on a web application that exhibited very interesting behaviors.

After compiling it, I would then browse to my virtual directory and the very first time it ran I would get errors reported.  Then I would refresh the page and it would work - for a bit.  Then I would get the same errors reported.  I'd refresh a second time and from that point on it ran flawlessly.  Interestingly, these problems did not exist on a coworker's machines.  However, if I ran the application from Visual Studio .NET, it ran fine from the get go.

Needless to say, I started to dive it and try to figure it out.  I robustified my error logging mechanisms in my application so that more descriptive messages would be written to the event log.  In short order, this led me to see that when from IE my ASP.NET Session and Application were recycling.  This is why I was getting the errors...I was loading objects up into Session at the start and then, all of the sudden, the values were gone.  I found it interesting that when run from VS.NET, the session objects would remain even after the Session recycled!

I did a little digging and found a couple of articles (article1, article2) on support.microsoft.com that offered some hope.  Well, after lots (and lots) of experimentation, I found that the articles offered the correct solution.  My virus scanner was affecting the session.  After I performed a rebuild (and a subsequent deploy), the OS marked those files as modified which recycled the process (ok, I was expecting that one).  Then, the anti-virus software would scan the files, affecting them again, again recycling the process.  The solution offered by the MS articles (and others) indicated to turn off AV scans on my \WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files folder.  That didn't seem to fix the problem.  However, I turned off scanning on my \Dev folder and all was hunky dory!

Sometimes, what seem to be the simplest of issues...are!  Once you know what the solution is.  For the longest time I thought it was a threading issue, but my robustified error logging eliminated that possibility :)

Saturday, August 14, 2004 11:52:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback