That's well-known behavior.
The AppDomain is restarted when the Application's directory structure changes.
It only happens when you use InProc session state management,
I think, but not with other session state management modes.
You can work around it by iterating through the files in the directory,
and deleting just the files, but not deleting the directory.
You may want to store the directory names and do multiple directory
deletions at your application's slowest time ( maybe even setup a Windows
service to do this for you at the time you prefer for the operation ).
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
===================================