ASP.NET APP 不断拒绝访问网络共享
我已将“网络服务”和我自己添加到该文件夹的安全权限中,但出现以下错误:
Access to the path '\\path\folder\image.gif' 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.
I have "Network Service" and myself added to the Security Permissions of the folder but I get the following error:
Access to the path '\\path\folder\image.gif' 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
检查ApplicationPool真正运行的用户在哪个用户下运行:如果您正在运行IIS 7(和更高),则该用户不是“网络服务”。
此外,您可以分配指定的用户运行此应用程序池并相应地授予权利。
Check under which user the ApplicationPool is really running: If you're running IIS 7 (and higher) this user is not the "Network Service".
Additionally you can assign a designated user to run this app-pool and grant the rights accordingly.
需要检查运行 asp 应用程序的 IIS 池。您可以向该池分配有权访问该文件夹的强身份。
Need to check in IIS pool that asp application is run under. Than you can assign to this pool strong identity that have acess to this folder.
网络共享具有正确的安全权限,但未为用户正确配置共享权限。
Network Share had correct Security permissions but the Share permissions were not configured properly for the user.
该文件夹是否在另一台服务器上?如果是这样,您需要为发出请求的服务器授予计算机帐户对远程服务器的读取权限。
Is the folder on another server? If so, you need to give the machine account for the server making the request read permissions on the remote server.