Question

I have an issue with IIS7 when mapping virtual directories to another machine.

This is my setup:

  • my Web APP is running on the web server (let's call it WEBSERVER). Windows Server 2008, IIS 7.
  • I got some assets/images in an assets server (let's call it ASSETSSERVER). Windows Server 2003, on the C:\Assets folder, shared as \\ASSETSSERVER\Assets
  • Servers are in a workgroup, not a domain. This is something beyond my control, which I can't change.
  • Following the recommendation of our network team, I configured the app pool to run under the user WEBSERVER\portaluser
  • In my web app, I define a virtual directory. I map it to \\ASSETSSERVER\Assets. In the log in credentials, I specify the user ASSETSERVER\assetsuser (which exists). The 'Test credentials' buttons show that i am authenticated OK and that I have authorisation.

At first, I got a 500.19 error telling me I could not log in. This post revealed the solution: I had to create a WEBSERVER\assetsuser user with same password (counter-intuitive, but it worked).

After that, my assets still refuse to display. I now get a message similar to this:

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\ASSETSERVER\assets'.

Source Error: 

[No relevant source lines]

Source File: \\ASSETSERVER\assets\web.config    Line: 0 

I have done some extensive googling, and I have tried the following:

  • Modified the local policy to allow WEBSERVER\portaluser to impersonate other accounts after login, as suggested here (it's for Windows 2000 Server but it was worth a try!)
  • Added permissions to everyone to the \\ASSETSSERVER\assets, as indicated here (bottom answer)
  • Added read/execute/list permissions to the c:\ drive in ASSETSSERVER to the ASSETSSERVER\assetsuser user, as suggested here (method 3)
  • I edited the registry key to stop IIS from monitoring the folders for changes, as indicated here (the writer claims that it's not related to IIS but I am quite certain that IIS does monitor the folders for changes in web.config)
  • I have configured allowsubdirconfig="false" in applicationHost.config as indicated here

None of these solutions have worked, and I am running out of ideas of what to try. It seems like I'm so close yet so far. Any suggestions?

Was it helpful?

Solution

After several of work I found the solution to this issue.

It was as simple as creating a user called "portaluser" (the same as my app pool identity user) in ASSETSSERVER.

This is counter-intuitive: I explicitly told IIS7 to connect to ASSETSERVER as the assetsuser server, but it was still using portaluser to check for the existence of web.config (and monitor for changes).

Having seen that, I decided to use the same account to run the app pool and to connect to the remote virtual directory. I just used 'assetsuser' instead of 'portaluser'

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top