如何授予文件夹读取服务器上的图像权限。 [英] How to give permisson to a folder to read image on server.

查看:166
本文介绍了如何授予文件夹读取服务器上的图像权限。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

How to give permisson to a folder to read image on server.



我使用WINSCP服务器,这里我上传文件..

我有很多谷歌,但是找不到任何解决方案..





请回复我。 。



我的尝试:




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: 

推荐答案

源错误在第84行,该行正在尝试创建目录。因此,它不是您需要的阅读权限,而是创建此目录的权限。
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.


这篇关于如何授予文件夹读取服务器上的图像权限。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆