web.config that worked under IIS 7.5 doesn't work under IIS 10

6

I have an ASP.NET web site running under IIS 7.5 Works great.

Now we're experimenting with a new Windows 10 server, which runs IIS 10. Copied the identical web site to the new server and try to open it:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.
...
Error Code     0x8007000d
...
Config Source:
  -1: 
   0: 

I looked up the error code:

Cause: This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element.

Resolution: Delete the malformed XML element from the ApplicationHost.config file or from the Web.config file.

But that web.config file has been working for years. Nothing has changed. So I think that "malformed xml" message is a red herring, and there must be some other setting I'm missing.

Any ideas?

asp.net
xml
iis-7.5
iis-10
asked on Stack Overflow Aug 25, 2015 by Shaul Behr • edited Jun 20, 2020 by Community

1 Answer

12

I was running into the exact same issue and for me it was because I forgot to install Url Rewrite 2.0 for IIS, so my rewrite rules were causing the error. Not sure if this will be the same for you or not.

I figured it out by commenting out blocks of the web.config until I got it to stop throwing that error.

Hope that helps!

answered on Stack Overflow Aug 26, 2015 by Eric Amodio

User contributions licensed under CC BY-SA 3.0