Click here to Skip to main content
15,896,547 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI
when i am uploading the images in database i am geting an error

This is the error Plz give me solution

Access to the path 'D:\InetPub\vhosts\solventjobs.com\mycarzs\CarImages\Bmw 11_060113105307.jpg' is denied.

XML
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\solventjobs.com\mycarzs\CarImages\Bmw 11_060113105307.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.





Thankyou
Posted
Comments
Shubham Choudhary 14-Mar-13 3:06am    
ok !!! so are you deploy project on iis
Shubham Choudhary 14-Mar-13 3:08am    
for this you have to do permission on to inetpub root directory
harshadcse 14-Mar-13 3:16am    
what type of error?
vakativamsi 14-Mar-13 6:47am    
what we donow Plzgive mee some answer

1 solution

The Internet Server runs with an account with low privileges. Generally, it must write or delete any files. Consequently, you must change the access rights for the folder "D:\InetPub\vhosts\solventjobs.com\mycarzs\CarImages" and any files there in.
 
Share this answer
 
Comments
vakativamsi 14-Mar-13 6:47am    
what we donow Plzgive mee some answer

D:\InetPub\vhosts\solventjobs.com\mycarzs\CarImages there have some images thats it
[no name] 15-Mar-13 15:57pm    
You are kidding right? The error message tells you exactly what the problem is AND how to fix it. Bernhard here tells you exactly how to fix it and you want more? Read the message and do what it says would go a long way to fixing your issue.

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