G
Guest
In my Windows Form, I have a io.File.Delete(filePath) command. Everyone has Full Control to the folder and file. I watch the file with FileMon and nothing opens the file in my code. (There is no code to open the file before the delete command.) I get an 'UnauthorizedAccessException'.
How can I find out what's causing this exception. What could keep me from deleting the file. Please help. This, should be, simple thing is holding up production.
I cannot delete the file while my app is running. Why?
I have this in my code before the File.Delete command:
Dim myAssem As System.Reflection.Assembly = System.Reflection.Assembly.LoadFile(thisPath & "\" & drCurrent("FileName"))
currentVersion = myAssem.GetName.Version
...'Save the Version to a dataTable
myAssem = Nothing
Could this be locking my file? If so, how do I unlock it?
How can I find out what's causing this exception. What could keep me from deleting the file. Please help. This, should be, simple thing is holding up production.
I cannot delete the file while my app is running. Why?
I have this in my code before the File.Delete command:
Dim myAssem As System.Reflection.Assembly = System.Reflection.Assembly.LoadFile(thisPath & "\" & drCurrent("FileName"))
currentVersion = myAssem.GetName.Version
...'Save the Version to a dataTable
myAssem = Nothing
Could this be locking my file? If so, how do I unlock it?