Microsoft never ceases to amaze me how they keep showing the most obscure error messages and support documentation for the simplest of causes.
HTTP Error 500.19 - Internal Server Error
Description: The requested page cannot be accessed because the related configuration data for the page is invalid.
Error Code: 0x80070005
Notification: BeginRequest
Module: IIS Web Core
Requested URL: http://www.mysite.com/myapp/
Physical Path: ~~
Logon User: Not yet determined
Logon Method: Not yet determined
Handler: Not yet determined
Config Error: Cannot read configuration file
Config File: ~~
Config Source:
More Information... This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.
I was getting IIS 7 error 500.19 on Windows Server 2008 over the weekend, and when I discovered it I spent hours on this error. Google didn't help; everyone pointed to invalid XML in the web.config or in applicationHost.config, or said that there must be an invalid DLL reference in applicationHost.config, or said that I need to add the proper users (IIS_IUSRs, Network Service, IUSR) to the directory and/or web.config. None of these solutions applied. There was nothing in my Windows event logs and enabling IIS tracing produced no log files.
It turned out to be a simple cause: the physical directory as configured in Basic Settings for the application was wrong. Why Microsoft did not include this rather obvious scenario in the Help file for this error is beyond me!!
In my case, my root web was working fine, but my subwebs were not working fine and I got this error for the subweb. The subweb was an individually configured ASP.NET application. I figured that this wasn't important because the root web was just a flat HTML file, but it mattered.
What happened in my case was that a few days ago I had relocated the root web, then updated IIS to point to the new directory. All of the subweb applications, however, were treated by IIS as virtual directories, each with its own physical directory mapping. So each had the stale path. More specifically, I moved "C:\dir\www.mysite.com" to "C:\dir\mysite.com", updated IIS for my site to point to \dir\mysite.com, and left it as such. The applications under ...\mysite.com were each pointing to the stale absolute path of C:\dir\www.mysite.com\[application] instead of picking up the relative path of their parent directory.
I had to update each subweb application's Basic Settings to point to the revised path, and the 500.19 error went away.
Hope this helps others like it would've helped me.
Jon