【问题标题】:Accessing Network Share Generates "Failed to start monitoring changes to '\\share' because access is denied."访问网络共享生成“无法开始监视对 '\\share' 的更改,因为访问被拒绝。”
【发布时间】:2010-07-02 17:20:01
【问题描述】:

我在同一个 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

【问题讨论】:

    标签: security exception web-applications permissions virtual-directory


    【解决方案1】:

    我必须启用 ASP.NET Impersonation 才能访问这些文件。我不知道为什么会这样,但它现在已启用并且可以正常工作。

    【讨论】:

    • 如果我可以问一下,您在模拟对话框中使用了哪些凭据?
    • 您是指网络服务用户吗?
    • 如果删除 web.config 行,对我来说有效:<identity impersonate="true" userName="domain\adminapp"
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-05-06
    • 2017-03-16
    • 2013-01-05
    • 2016-04-17
    • 1970-01-01
    • 2021-10-02
    • 1970-01-01
    相关资源
    最近更新 更多