2

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

为什么这适用于一个而不适用于另一个?

权限是正确的:

替代文字 http://uorcdn.com/foronlinesharing/20100702-0123pm.jpg

4

1 回答 1

0

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

于 2010-07-02T18:36:04.737 回答