By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,426 Members | 1,729 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,426 IT Pros & Developers. It's quick & easy.

DirectoryInfo.delete(true) access denied

P: n/a
MP
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.EmailImagesFolder RootPath + "\\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.

Jan 12 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.