我正在尝试创建一个多文件上传功能(来自http://msdn.microsoft.com/en-us/library/aa478971.aspx的最后一个示例)
我将上传位置更改为
"httpContext.Current.Server.MapPath("~/images/")
当我上传一个文件时,它会说
访问路径"D:....“被拒绝了。
由于某些原因,我无法在服务器上设置文件夹的权限。我还能做什么?
感谢大家的帮助。谢谢!
发布于 2014-01-28 09:33:23
您的asp.net帐户{MACHINE}\ASPNET
对该位置没有写入权限。这就是它失败的原因。
考虑向ASP.NET请求标识授予对资源的访问权限。
单击-Right downloading Properties > Security Tab > Edit > Add > locations > choose your local machine > click OK > Type ASPNET below "Enter the object name to select" > Click Check Names Check the boxes for the desired access (Full Control). If it will not wok for you do the same with Network Service
。
现在,这应该显示您的本地{MACHINENAME}\ASPNET
帐户,然后您设置此帐户的写入权限。
https://stackoverflow.com/questions/21401539
复制