访问网络共享生成“无法开始监视“\\共享”的更改”因为访问被拒绝。”
我在同一个 IIS 7 机器上有两个 Web 应用程序。一个应用程序正在使用 .NET 2.0 的应用程序池中运行。另一个使用 .NET 4 在不同的应用程序池中运行。两者都以应用程序池身份运行并具有相同的设置。每个都包含一个网络共享的虚拟目录。要访问共享,需要使用用户名和密码进行连接。 .NET 2.0 Web 应用程序连接得很好。但是,.NET 4 Web 应用程序会生成一条错误,指出以下内容:
Exception information:
Exception type: System.Configuration.ConfigurationErrorsException
Exception message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\share' because access is denied. (\\share\web.config)
Inner exception information (level 1):
Exception type: System.Web.HttpException
Exception message: Failed to start monitoring changes to '\\share' because access is denied.
为什么这对其中一个有效,而对另一个无效?
权限正确:
alt text http://uorcdn.com/foronlinesharing/20100702-0123pm.jpg
I have two web applications both on the same IIS 7 box. One application is running in an app pool with .NET 2.0. The other is running in a different app pool with .NET 4. Both are running as the app pool identity and have identical settings. Each contains a virtual directory of a network share. To access the share, a username and password are used to connect. The .NET 2.0 web app connects just fine. However, the .NET 4 web app generates an error stating the following:
Exception information:
Exception type: System.Configuration.ConfigurationErrorsException
Exception message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\share' because access is denied. (\\share\web.config)
Inner exception information (level 1):
Exception type: System.Web.HttpException
Exception message: Failed to start monitoring changes to '\\share' because access is denied.
Why would this work for one and not the other?
The permissions are correct:
alt text http://uorcdn.com/foronlinesharing/20100702-0123pm.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须启用 ASP.NET 模拟才能访问文件。我不确定为什么会出现这种情况,但它现在已启用并且可以工作。
I had to enable ASP.NET Impersonation for the files to be accessible. I'm not sure why that's the case, but it's enabled now and working.