开发者

Accessing Network Share Generates "Failed to start monitoring changes to '\\share' because access is denied."

开发者 https://www.devze.com 2023-01-06 07:46 出处:网络
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 p

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. (\\sha开发者_开发知识库re\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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消