Problem in Deleting the file
-
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 S. 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 S. 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 S. Sekhon
For me, you might grant access right to that folder for asp.net account.... << >>
-
For me, you might grant access right to that folder for asp.net account.... << >>
how can I grant Access right for the folder for the asp.net account.
Thanks, Sandeep S. Sekhon
-
how can I grant Access right for the folder for the asp.net account.
Thanks, Sandeep S. Sekhon
I cannot remember exactly right now Maybe, you just right-click on the foler > in the security tab -> just add the asp.net account... << >>