2
Answers

delete file from web host

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

Answers (2)