Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to upload the image and save it into the folder named as dbImage. on local host it was working but on current server it gives some permission error... as
<br />
"Access to the path <br />
'D:\PLESKVHOSTS\vhosts\hoteldeluxe.com\httpdocs\dbImage\285680_341433335924712_1150059646_a.jpg' is denied."<br />
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.<br />
<br />
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."<br />

I have already provide everyone access wih full control to this folder still i am facing the same problem
Posted
v2
Comments
Sushil Mate 11-Oct-12 7:37am    
where this folder resides?? it should be in the your website's virtual directory on server.
Restart the IIS & test it.
I.explore.code 11-Oct-12 13:58pm    
can you try giving "NETWORK SERVICE" account full access to that folder and see if that fixes it?
Rohit Shrivastava 12-Oct-12 11:06am    
did you copy the folder from desktop? if yes please try to delete the folder and re-create.

1 solution

Hi,

This issue is due to permission of the folder access. when you host your application on IIS it will run under the user called IUSER_machine name it has very restricted access, where as while running the code on the local machine with visual studio which will run under the local admin user which has complete access for the folders.

For running the application on the server

D:\PLESKVHOSTS\vhosts\hoteldeluxe.com\httpdocs\dbImage

needs the permission for the following users

- IUSER_machin name
- ASPNET

Right click on the Folder and go to sharing and security
in Security Tab add the provided users and and provide the full access for this users.
 
Share this answer
 
v2

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