Thursday, August 28, 2014

0x80070003 HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

While deploying a aspx app, I kept getting this error:
0x80070003 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 0x80070003
Config Error Cannot read configuration file
Config File \\?\E:\Inetpub\wwwroot\MyApp\4.1\web.config


Naively, I believed the error message and thought my web.config was bad xml. But checking an online xml validator, the file was fine.

I then looked at permissions, and temporarily giving everyone permission to read the file didn't help.

I finally found and article here that cast a thin ray of light upon my troubles.

The clue was the "\\?E:\Inetpub\wwwroot\MyApp\4.1\web.config" line. I was making my test machine look more like production machines by creating a fake E: drive using
subst E: "C:\Edrive"
But IIS was not able to grok the fake E: drive. In the IIS GUI I right-clicked on the application and selected "Manage Application/Advanced Settings/Physical Path" and changed that from "E:" to "C:\Edrive" and it worked.

No comments: