我在同一个 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.
为什么这适用于一个而不适用于另一个?
权限是正确的: