Click here to Skip to main content
11,802,076 members (53,331 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP .NET
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
"Access to the path
'D:\PLESKVHOSTS\vhosts\\httpdocs\dbImage\285680_341433335924712_1150059646_a.jpg' is denied."
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."

I have already provide everyone access wih full control to this folder still i am facing the same problem
Posted 11-Oct-12 0:08am
Sushil Mate at 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.
Aman.A at 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 at 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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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


needs the permission for the following users

- IUSER_machin name

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.

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

  Print Answers RSS
0 OriginalGriff 485
1 KrunalRohit 341
2 F-ES Sitecore 255
3 Afzaal Ahmad Zeeshan 220
4 CPallini 205
0 OriginalGriff 2,715
1 Maciej Los 1,900
2 KrunalRohit 1,797
3 CPallini 1,550
4 Richard MacCutchan 1,157

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 1 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100