Click here to Skip to main content
Rate this: bad
good
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\hoteldeluxe.com\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
Edited 11-Oct-12 2:14am
Tadit Dash85.6K
v2
Comments
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
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 756
1 OriginalGriff 452
2 Tadit Dash 350
3 sanket saxena 329
4 Peter Leow 228
0 Sergey Alexandrovich Kryukov 11,890
1 OriginalGriff 7,335
2 Peter Leow 5,003
3 Abhinav S 3,943
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web01 | 2.8.140421.2 | Last Updated 1 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid