Click here to Skip to main content
15,850,921 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
Access to the path 'D:\INETPUB\VHOSTS\abe\httpdocs\uploads\101 (2).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 'D:\INETPUB\VHOSTS\zoomproperty.in\httpdocs\uploads\101 (2).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 and IIS 7, and the configured application pool identity on IIS 7.5) 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 File 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
Kornfeld Eliyahu Peter 3-Dec-14 3:14am    
So? It's an authorization issue, you can not solve it from code...
However you may choose an other - authorized - destination for your files...
Karthik_Mahalingam 3-Dec-14 3:17am    
Add sufficient permission to the 'uploads' folder
right click -> Properties -> Security..

In the error message that is popup you can see the error details (Unauthorized Access) and also the solution (to give access rights).

PS: So did you tried like is suggested and is not working?
 
Share this answer
 
domain permission iis_user to checked my problems solve
 
Share this answer
 
Comments
Manfred Rudolf Bihy 5-Dec-14 6:30am    
This looks like abuse. You were already told what the issue is.

Reported!
domain permission iis_user to checked my problems solve
 
Share this answer
 

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