.NET component, ASP.NET controls .NET component, ASP.NET controls
Skip Navigation LinksHome > Support > Knowledge Base > Access to the path is denied

Question: Why do I get an error "Access to the path "..." is denied".

Summary:

ASP.NET is not authorized to access the requested path. Most likely you are not grant an access the the path, wich you use in Save or Copy operation(UploadedFile.SaveAs(string path, bool overwrite) or UploadedFile.CopyTo(string path, bool overwrite)). Consider granting access rights to the path to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>(see "References" section), the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.


Solution:

To grant ASP.NET write access to a path, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6). Highlight the needed account, and check the boxes for the desired access.


References:



Site Map Asp.net components  Privacy Asp.net components  Terms of Use
Asp.net components ©2005-2008 EasyAlgo Software. All Rights Reserved.
EasyAlgo Software