Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to give permisson to a folder to read image on server.

I am using WINSCP server , here i upload my file..
I have google a lot, but stil cant find any solution..


Please reply me..

What I have tried:

Server Error in '/' Application.
Access to the path 'D:\WEBDATA\weblinkservices.in\Admin\Uploads\Photo Gallery\18' 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:\WEBDATA\weblinkservices.in\Admin\Uploads\Photo Gallery\18' 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.

Source Error: 


Line 82:                 {
Line 83:                     string GalleryPath = System.Configuration.ConfigurationManager.AppSettings["GalleryPath"] + MaxGalleryId;
Line 84:                     Directory.CreateDirectory(Server.MapPath(GalleryPath));
Line 85: 
Line 86:                     string ThumbnailPath = System.Configuration.ConfigurationManager.AppSettings["ThumbnailPath"] + MaxGalleryId;

Source File: d:\webdata\weblinkservices.in\Admin\AddGallery.aspx.cs    Line: 84 

Stack Trace: 
Posted
Updated 30-Aug-18 3:04am
Comments
F-ES Sitecore 30-Aug-18 4:22am    
Right-click on the folder and select properties and then use the security tab to apply the desired access rights.

1 solution

The Source Error is on line 84, that line is trying to Create a Directory. So it is not a reading permission you are needing, but a permission to create this directory.
 
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