Geeks With Blogs
Title Of Blog

This may not be news to most people, but was definitely a shock to me!


In the .NET 2.x framework a "feature" was implemented where by an ASP.NET application is automatically recycled if any subdirectory is deleted. This was apparently implemented to prevent stale content from appearing on a site.


The unfortunate side effect of this "feature" is that when using the "InProc" model for session management, all session data is lost if a subdirectory is deleted.


For those who progammatically may be adding/deleting directories within their application as inherent functionality, this causes a rather large problem.


The solution? Create your folder(s) which may be programmatically deleted outside of the root folder for the application. Alernatively, utilize a file based structure vs. folders since deleting files does not result in the same issue.

Posted on Monday, January 31, 2011 10:28 AM ASP.NET | Back to top

Comments on this post: Deleting ASP.NET application subdirectories causes application recycle!

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Jake Rutherford | Powered by: