Directory.Delete causes lost of Session
Hey,
There is a issue where sessions are lost when using the directory.delete() method, I have done some browsing and cannot find a solution to keep the session objects alive. Basically I have a session object which is my username and password object. Has anyone found a solution for this?????
Regards
Re: Directory.Delete causes lost of Session
Are you deleting a directory within the same folder which contains your application?
Because IIS monitors application folders for changes to files and folders. It's likely that you deleting a folder under the application folder is causing the application pool to be restarted, thus resulting in session loss.
Re: Directory.Delete causes lost of Session
Yes, I have read about this, yes it'z stored under "my websites main directory\others\deleted folder here". Is there a way around this or is it unavoidable???
Re: Directory.Delete causes lost of Session
Someone please help, it's for my assignment at tech!!!!
Re: Directory.Delete causes lost of Session
There isn't a way around this. Deleting a directory is not a common task in general web applications. As a result, you will need to think of a workaround.
You could store the directories external to the web app directory. You could just not delete the directory but mark it as deleted by adding some sort of an entry in a database.