asp.netsessionoutdirectory.delete

why the session in iis automatically log out?


I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? Thanks in advance!


Solution

  • I assume the directory you are trying to delete is within the website folder.

    When you delete a folder inside a website, then asp.net will restart resulting in loss of session state.

    To avoid this problem

    1) Try to implement out-of-process session state.

    OR

    2) Move the folder out of web application folder.