我正在使用第三方服务器,我正在尝试从我的web表单上传图像到服务器,我在c# mvc.It中制作的图像在我的本地主机上运行良好,当我发布它时,它给了我一个错误
System.UnauthorizedAccessException: Access to the path 'D:\InetPub\vhosts\abc.com\httpdocs\Images\Sections\Developer\ClientLogo\circle-small-empty.18x18.png' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at System.Web.HttpPostedFileWrapper.SaveAs(String filename) at ab.CorporateSite.Controllers.DeveloperController.ImagePath(HttpPostedFileBase imgfile).通过filezilla,我已经检查了要保存图像的服务器上的特定文件夹(ClientLogo文件夹)的权限。为此,它拥有完全的权限,在我的本地系统上,我也给了网络服务和每个人的完全权限。
我一直在努力解决这个问题,从昨天开始,没有什么是工作的out.Please建议我应该做什么?
发布于 2013-02-14 04:23:02
您需要授予对运行应用程序的IIS application pool identity的文件夹的权限。
需要权限的虚拟用户通常是IIS AppPool\AppPoolNameGoesHere。
发布于 2016-12-20 20:40:54
向用户/组添加权限:
在IIS服务器中,转到站点->文件夹->的编辑权限,转到安全选项卡,然后将权限授予适当的用户或组。
https://stackoverflow.com/questions/14862256
复制相似问题