1
Vote

Error as access to path is denied

description

hi.
when ever i load the file and say upload it throws me this error.
 
System.UnauthorizedAccessException: Access to the path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\template\layouts\SpreadSheet\Temp\Sample Excel File to Import.xlsx' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at System.Web.UI.WebControls.FileUpload.SaveAs(String filename) at ASP._layouts_spreadsheet_spreadsheet_aspx.UploadFiles() at ASP._layouts_spreadsheet_spreadsheet_aspx.btnUpload_Click(Object sender, EventArgs e

comments