问题描述
我有一个ASP.NET应用程序,尝试在运行时在Web服务器上写入文件.在我的开发环境中,这可行.但是,当我将其部署到生产服务器并执行代码时,收到一条错误消息:
I have an ASP.NET application that attempts to write files on the web server during runtime. In my development environment, this works. However, when I deploy it to the production server, and I execute the code, I receive an error that states:
"Access to the path 'C:\Inetpub\wwwroot\MyWebApp\DirToWriteTo\' is denied."
我的生产服务器是Windows Server 2003计算机.Web应用程序设置为允许通过IUSR_TEMPLATE帐户进行匿名访问.
My production server is a Window Server 2003 machine. The web application is set to allow anonymous access via the IUSR_TEMPLATE account.
我在做什么错了?
谢谢!
推荐答案
您需要向 NETWORK SERVICE 用户提供授予权限权限.
You need provide the grant permissions to NETWORK SERVICE user.
您可以检查此链接:-
http://repeatgeek.com/technical/asp-net-access-to-path-denied/
这篇关于ASP.NET +对该路径的访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!