Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
Access to the path 'C:\inetpub\wwwroot\onlinedoctorspool.com\ImageStorage\gdfgd.jpg' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\onlinedoctorspool.com\ImageStorage\gdfgd.jpg' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource 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"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Posted
Comments
manvendra patel 24-Sep-14 8:36am    
if your asp.net project on server then please contact to hosting server website ,because you have no authority to edit /Delete/ data in asp.net Folder .

As the error states you need to allow access for ASPNET to the folder in question.

have a read of this Granting File Access Permissions[^]
 
Share this answer
 
its totally permission related issue. two things can be done. First of all try running your IIS in administrator mode and second thing provide sufficient access to IIS to use specified file .For that assign All the accces to specific directory for IUser
 
Share this answer
 
Comments
Simon_Whale 24-Sep-14 5:48am    
Why run the IIS in administrator mode?
ashok rathod 24-Sep-14 6:23am    
Administrator has higher privileges than normal user account.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900