PC Review


Reply
Thread Tools Rate Thread

DirectoryInfo.delete(true) access denied

 
 
MP
Guest
Posts: n/a
 
      12th Jan 2007
Hi,

I am getting the Access denied Error on a folder after I try to delete
a folder that contains some files through my ASP.NET Application.

Following is my code

DirectoryInfo directoryInfo = new
DirectoryInfo(EmailConfiguration.EmailImagesFolderRootPath + "\\Event_"
+ eventId);
if(directoryInfo.Exists) {
directoryInfo.Delete(true);
directoryInfo.Create();
}
else {
directoryInfo.Create();
}


I have made sure that the folder is not open in explorer.
But the folder is one of my subdirectories of current virtual
directory.
No other application is accessing the folder or any files within that
folder.

Please give me a solution for this.
Its really urgent.

Thanks for any solution in advance.

Thanks
Mahesh Mahangare.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fso.FolderExists Gives True but Access is Denied Jonas Microsoft Excel Programming 0 18th Mar 2011 02:45 PM
DirectoryInfo delete and create oren.almog@gmail.com Microsoft C# .NET 1 19th Mar 2007 03:15 AM
Reflection and DirectoryInfo.Delete error goHawkeyes Microsoft Dot NET Framework 2 29th Jan 2007 03:14 PM
Access Denied on folder after using DirectoryInfo.Delete(true) Zeb Microsoft C# .NET 3 19th Jan 2007 11:20 AM
Get access denied error when using DirectoryInfo.delete =?Utf-8?B?Q2hhcnRz?= Microsoft C# .NET 7 17th Nov 2005 01:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:19 PM.