简体   繁体   中英

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

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?

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!

I had the same problem and was not able to found either the reason for that nor the solution. I saw the description about the rewrite module installation each times, but this has not solved my problem at all, Finally, after a few days: I came across this site:

IIS unable to read web.config, no error details in message

I followed this instruction and installed the mentioned environment on the server. After that I restarted it and lo and behold, everything worked fine:-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM