Wednesday, March 28, 2012

System.Io.Directory.Delete

sometime when debuging my VS.NET 2005 app, when I call
System.IO.Directory.Delete does not work, but never throws an
exception. but when I try access that directory by going to windows
explorer, it gives me Access Exception, permissions denied.

it's when I close the VS.NET when the directory is actually deleted.
anyone knows why this would behave this way?

BTW, when I use FileSystemObject delete method, it works perfectly,
but I want to use .NET for all my sites projects.

thanks.Hello mr t (Please use your real name here)

Quote:

Originally Posted by

sometime when debuging my VS.NET 2005 app, when I call
System.IO.Directory.Delete does not work, but never throws an
exception. but when I try access that directory by going to windows
explorer, it gives me Access Exception, permissions denied.


Same Behavior in Release Mode?

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

0 comments:

Post a Comment