I know this is a strange request, but I'm going nuts trying to figure out why my session is terminated the moment I either delete or move a folder via code using system.io.directory or system.io.directoryinfo objects.
I'm trying to allow users to add, edit the names of and remove physical directories within the website. This will then be used with some file upload code. The session variable works across the entire site until the user either deletes or renames(moves)a directory.
Here is the snippet of code used to delete a directory, if this is commented out the page runs without terminating the session, otherwise running this kills it.
Dim dDirInfo As IO.DirectoryInfo
dDirInfo = New System.IO.DirectoryInfo(s_Physical_Path)
dDirInfo.Exists = True Then dDirInfo.Delete()
dDirInfo = Nothing
The code works fine and does exactly what I intended it to do, but obviously I'm doing something really bad here. Please put me out of my misery and tell me what an idot I've been, and if at all possibel why?
I'm trying to allow users to add, edit the names of and remove physical directories within the website. This will then be used with some file upload code. The session variable works across the entire site until the user either deletes or renames(moves)a directory.
Here is the snippet of code used to delete a directory, if this is commented out the page runs without terminating the session, otherwise running this kills it.
Dim dDirInfo As IO.DirectoryInfo
dDirInfo = New System.IO.DirectoryInfo(s_Physical_Path)
dDirInfo.Exists = True Then dDirInfo.Delete()
dDirInfo = Nothing
The code works fine and does exactly what I intended it to do, but obviously I'm doing something really bad here. Please put me out of my misery and tell me what an idot I've been, and if at all possibel why?