IIS 7.5 - Setting up a Virtual Directory for a file share on another domain


I have a Windows 2008 R2 server running IIS 7.5. I'd like to set up a virtual directory for my website to allow the download of video files from a file share on a server in another domain. I have a domain username and password that allows me to access this file share. However, when I try to setup the virtual directory in IIS, I get the following error message:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

  • Module: IIS Web Core
  • Notification: BeginRequest
  • Handler: Not yet determined
  • Error Code: 0x8007052e
  • Config Error: Cannot read configuration file
  • Config File: \\?\UNC\z27ar1cfvs004.abc.se\video$\web.config
  • Requested URL: http://localhost:8080/Video
  • Physical Path: \\z27ar1cfvs004.abc.se\video$
  • Logon Method: Not yet determined
  • Logon User: Not yet determined

Weirdly, I can hit Explore on my virtual directory and IIS will launch Explorer showing me the files.

For my site's authentication settings I have Basic and Windows authentication settings enabled.

Here are the things I've tried unsuccessfully:

  • Changing the Connect As... user for the site to use the domain user credentials
  • Changing the Connect As... user for the virtual directory to use the domain user credentials
  • Changing the Application Pool identity for the website to use the domain user account credentials
  • Creating a local user account on the IIS server with the same username/password as on the domain server, and trying all 3 steps above again but only specifying the username rather than domain\username
  • Changing the Managed Pipeline Mode: neither Integrated nor Classic makes any difference

I've Googled until my eyes have gone blurry and spent hours trying many recommended suggestions but all to no avail.

How can I solve this problem?

asked on Stack Overflow Sep 12, 2013 by markiemooster • edited Apr 23, 2019 by Michael

1 Answer


I have found a couple ways around this, depending on what your problem is:

  • Actually make a web.config file in the shared directory.
  • Make a <location path="video" inheritInChildApplications="false" /> element in your main web.config to specify that the virtual directory is not allowed to have web.config settings override its parent.
  • Set up a real directory in your website that does have a web.config in it, and use the URL Rewrite tool to make a set of rewrites to the actual content.
  • If you have written a custom HTTP Module that is enabled for the site, turn it off for that directory. For instance, if the module does not have to run on static files, add precondition="managedHandler" to its settings in web.config or applicationHost.config.
answered on Stack Overflow Apr 23, 2019 by Michael

User contributions licensed under CC BY-SA 3.0