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.
|