G
Guest
Hello,
The method Directory.Delete(path, true) of .NET 2.0 called from within a web
app does not work correctly if the initial directory is not empty : all the
files inside the root directory and subdirectories are actually deleted, but
the leaf subdirectories in the tree remain "locked" (they are not accessible
anymore by the webapp or by Windows Explorer) until the webapp ends.
When the web app is ended, the leaf subdirectories actually disappear in the
explorer.
The directory to delete is inside the virtual dir of the web app.
When I try to delete recursively the files with File.Delete before calling
Directory.Delete, I get exactly the same problem.
Is there any fix to this problem ?
The method Directory.Delete(path, true) of .NET 2.0 called from within a web
app does not work correctly if the initial directory is not empty : all the
files inside the root directory and subdirectories are actually deleted, but
the leaf subdirectories in the tree remain "locked" (they are not accessible
anymore by the webapp or by Windows Explorer) until the webapp ends.
When the web app is ended, the leaf subdirectories actually disappear in the
explorer.
The directory to delete is inside the virtual dir of the web app.
When I try to delete recursively the files with File.Delete before calling
Directory.Delete, I get exactly the same problem.
Is there any fix to this problem ?