Deleting sub-directories (folders) in ASP.NET 2.0 restarts the AppDomain

All the while I thought that the AppDomain only restarts when the
web.config, global.asax, bin folder (or it’s contents) is changed and
if there are considerable number of files have changed (15 is the magic
number as they say but can’t verify).

All the while I was wrong,
by default (that is without tweaks), deleting a folder under your
application will restart the AppDomain (implies but not limited to
clearing all sessions, cache etc).

Took me a considerable time to trace the issue I have more than guesses on what’s messing the application.
http://weblogs.asp.net/owscott/archive/2006/02/21/ASP.NET-v2.0-_2D00_-AppDomain-recycles_2C00_-more-common-than-before.aspx
http://objectsharp.com/cs/blogs/bruce/archive/2004/11/01/992.aspx
http://blogs.msdn.com/toddca/archive/2005/12/01/499144.aspx

And
thanks to Performance Monitor (Start > Run > perfmon or
Adminstrative Tools > Performance) for the hints that there is
something messing with my sessions and cache.

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.