S
Sandeep Singh Sekhon
I am Developing a Web Application with ASP.NET 1.1
I have one project Folder which is virtual directory of IIS.
In this directory, I have one Folder named Photos in which I used to
Store Photos. On my Web Page, I have a button named delete which I used
to delete photo in the folder.
But when I click the button and apply the logic to delete the file, it
raises an Exception that the access to the file is denied. I am using
following code to delete the file. Please give me any suggestion.
FileInfo objectFile = new FileInfo(strFilePath); objectFile.Delete();
//This throws an Exception that Access to the file is denied on line
objectFile.Delete()
Thanks,
Sandeep Singh Sekhon
I have one project Folder which is virtual directory of IIS.
In this directory, I have one Folder named Photos in which I used to
Store Photos. On my Web Page, I have a button named delete which I used
to delete photo in the folder.
But when I click the button and apply the logic to delete the file, it
raises an Exception that the access to the file is denied. I am using
following code to delete the file. Please give me any suggestion.
FileInfo objectFile = new FileInfo(strFilePath); objectFile.Delete();
//This throws an Exception that Access to the file is denied on line
objectFile.Delete()
Thanks,
Sandeep Singh Sekhon