can any one share how to delete file from web host. in my application am uploading file,which user on updating am deleting previous file and insert new file. but i had following error
System.UnauthorizedAccessException: Access to the path 'c:\inetpub\wwwroot\test\Admin\Products\Brochure\dsad\Changes.txt' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.Delete(String path) at Admin_Products_CatalogMasterDetails.btnsave_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\test\Admin\Products\CatalogMasterDetails.aspx.cs:line 140
thanks in advance
Delete file from web host
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rafiq Batcha18 reputationPosted Apr 9, 2008, 2:53 PM EDT
Hi,
Can you make sure that folder is accessable by ASPNET or any specific user? Especially "Full Control" rights.
sa san14 reputationPosted Apr 9, 2008, 8:35 PM EDT
yeah i had given full permission for user,thing is dat am able to update or file file locally(on my pc where the project is suitated) even remote user when updated file get insert but with the following error.
thanks in advance , help is appreciated