"Cannot read configuration file" Error when accessing the image from the virtual directory on IIS whose physical path is network folder


I have deployed my application on IIS 7.0. I wanted a shared Image folder in my application, so I created a virtual directory inside my deployed application on IIS.

I set the physical path for this virtual directory to a shared folder on another machine. Now when I try to browse any image from this shared folder I get the following 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 0x8007052e
Config Error Cannot read configuration file
Config File \?\UNC\WINSERVER1\hpu_images_staging\web.config
Requested URL http://[IPAddress]/Images/Temp_Harsh/photos/086b88b9-a228-4e0d-ba29-436c74ff5258.jpg
Physical Path \WINSERVER1\hpu_images_staging\vetphotos\086b88b9-a228-4e0d-ba29-436c74ff5258.jpg
Logon Method Not yet determined
Logon User Not yet determined
Failed Request Tracing Log Directory C:\inetpub\logs\FailedReqLogFiles

How do I resolve this?

asked on Stack Overflow Apr 11, 2011 by CHash_Mike • edited May 11, 2015 by Hand-E-Food

2 Answers


Basically adding the right username and password for the VD in Basic settings resolved this..

answered on Stack Overflow Jun 12, 2013 by CHash_Mike

Does this http://support.microsoft.com/kb/942055 help? I see that Cause#2 matches what you are doing. See if that helps

answered on Stack Overflow Apr 11, 2011 by Subhash Dike

User contributions licensed under CC BY-SA 3.0