I have a virtual directory in my site (test environment). It is a UNC share which is also used as a public FTP.
It is configured to connect as a domain admin account and "Test settings" says everything appears to be working. However when I try to connect to it I get:
500 - "Failed to start monitoring changes on \INTRANET\FTP\test\web.config because access was denied"
This is an ASP.NET YSOD. I am not sure why ASP.NET is getting involved at all as it's a static .jpg file I'm requesting.
I tried turning on failed request tracing and this is the specific error:
If I change the "Physical Path Logon Type" from ClearText to Network. I get the following IIS error:
HTTP Error 500.19 - Internal Server
Error The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
- Module IIS Web Core
- Notification BeginRequest
- Handler Not yet determined
- Error Code
- Config Error Cannot read configuration file due to insufficient permissions
- Config File
Logon Method Not yet determined
- Logon User Not yet determined
- Failed Request Tracing Log Directory
This does not generate a failed request log strangely enough—I have set the failed request tracing to trace errors with error codes 400-999.
Also worth noting is that if I open the Configuration feature from within IIS, I see an access denied error.
I have exactly the same set up on my local dev machine to the same UNC path and the same user it works. Just on the test server it does not.
What am I doing wrong?
The fact that it's an ASP.net app is probably exactly what the issue is here. Your application pool identity has to have rights (not necessarily the IIS identity; by default, the app pool identity is the local Network Service account.) You also probably need to run caspol.exe on your IIS machine.
%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag 1. -url "file://\\remotefileserver\content$\*" FullTrust
I resolved our issue by creating matching accounts on both the web server and the unc server. I then modified the Application pool to run using that matching account not network service. This gave me the flexibility to sync the password on both servers without affecting other network service dependent functions.
If this shared source is not an application (e.q. an image folder), Try to configure the virtual directory to be ignored by the root application which includes the virtual directory (in my case I've completed this by changing the root app pool type as Classic instead of Integrated mode). But if There is an application in the shared point then you may follow the way @mfinni stated.
I had the same problem on IIS 7.5 I found the solution to be:
Just had the same issue with a non-domain web server accessing some domain resources using a domain account. We were getting strange behavior ("test credentials" would fail even though we knew credentials were right, we could see folders and files in content view, but couldn't "browse" them). Solution was to create a local user on the machine with the same name as the domain user.
I'm thinking this is what would have happened if the web server were a member of the domain, and the local user was necessary to get at some local resources (config?) in order to map the virtual.
Hope that helps someone.
User contributions licensed under CC BY-SA 3.0