title: Deleting a directory results in application restart
body: <p>I have an application with 2 directories (books and export).<br />
  If we create a book or a page of a book in the application a directory is added with the id of the page (this is for uploading resources).<br />
  If we delete a page, the page (and it's directory) is removed from the database and the filesystem.</p>
  <p>However this resulted in a session loss (even an application restart). I've looked up some thing on google and found the following <a href="http://web.archive.org/web/20110303233125/ttp://www.vikramlakhotia.com/Deleting_Directory_in_ASPnet_20.aspx" rel="nofollow noreferrer">link</a>.<br />
  It seems to be a problem in ASP.NET 2.0 (and 3.5).</p>
  <p>We are now thinking about writing a service that will clean up the directories at night.<br />
  But there has got to be another solution for this no?<br />
  Oh and putting the directory outside the virtual directory is not an option.</p>