views:

26

answers:

1

I have a Silverlight application using a WCF service hosted in IIS. I make use of some aspects of ASP.NET.

I have the following folder structure for my application:

inetput
  wwwroot
    myapp
      reports
        {user-guid-folders}
          report1.pdf
          report2.pdf
      App_Data (folder)
      bin (folder)
      Client_Bin (folder)
      (various .aspx files, plus web.config, etc.)

The application dynamically generates reports and puts them in a folder with a GUID for the name which is unique to the user. This all works fine.

However, when the user logs out I was cleaning up and deleting the PDF files in their folder, then deleting their GUID folder.

Deleting the files works fine, but if I delete the folder, the application recycles (which then removes all other users' sessions - I get a Session_OnEnd event for every user's session, and an Application_OnEnd event. The next user request causes the whole application to restart.

So, while I can fix this by not deleting the GUID folder (which my application itself created), what is the reason for this? Is there any way I can prevent this from happening?

+2  A: 

The following article talks about this issue... http://blogs.msdn.com/b/toddca/archive/2005/12/01/499144.aspx

Minh Nguyen
Thanks, that explains it! Pretty crappy behaviour!
Craig Shearer