HTTP Error 500.19 with 0x8007000d on IIS7 "Malformed XML" in web.config


I'm forced to rebuild my machine from factory default. Everything should be the same, IIS version (7.5), OS (Windows 7), and my website files. However, something is different because after configuring my website and pulling the local site up in my browser, 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. Error Code 0x8007000d

When I look up error code 0x800700d it tells me...

Analysis: This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element. To resolve this problem, see Resolution 1.

Then offers a resolution of...

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

However I see no malformed XML, and when I remove the web.config file altogether, the site loads but URL Rewriting doesn't work (obviously). Furthermore, even if I delete all XML from the web.config file, leaving it blank, I get the same error. It seems to have a problem with the fact that the web.config file exists at all.

For reference, here's the contents of my web.config...

<?xml version="1.0" encoding="UTF-8"?>

<!-- this file can be deleted if you're not planning on using URL rewriting with IIS 7. -->
<!-- you can add your own files and folders that should be excluded from URL rewriting by adding them to the "pattern" below. -->
<!-- please read the online documentation on for more information about URL rewriting. -->


            <rule name="ColdFusion on Wheels URL Rewriting" enabled="true">
                <match url="^(.*)$" ignoreCase="true" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{SCRIPT_NAME}" negate="true" pattern="^/(flex2gateway|jrunscripts|cfide|cfformgateway|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.*$)" />
                <action type="Rewrite" url="/rewrite.cfm/{R:1}" />

Anyone have any ideas about how to resolve this issue?

asked on Stack Overflow Jan 3, 2013 by Chris Geirman • edited Jun 16, 2020 by Lex Li

6 Answers


Did you remember to reinstall the rewrite module? It's not included with IIS 7.5 by default.

Beyond that, here is a similar question - I think the part about malformed is a red herring.

answered on Stack Overflow Jan 4, 2013 by JohnW • edited May 23, 2017 by Community

After so much pain i could resolve this error. The actual reason for me is i was using some url rewriting in config. After removing error has gone. The below is the code which i have removed from web.config.

  <serverRuntime frequentHitThreshold="1" frequentHitTimePeriod="10:00:00"/>
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
      <match url="(.*)"/>
        <add input="{HTTPS}" pattern="off" ignoreCase="true"/>
      <action type="Redirect" redirectType="Permanent" url="{R:1}"/>
answered on Stack Overflow Jun 13, 2015 by chindirala sampath kumar • edited Oct 1, 2015 by Liam

i was in the same situation as you looking for XML. i found the solution. in web.config file ,at the top of the file, there is a xml section. delete the content below, this solve my issue, later on the site can be opened.

  <proxy autoDetect="true" />

answered on Stack Overflow Apr 19, 2013 by coco teng • edited Oct 1, 2015 by Liam

This problem also occurred with me... try this for Error Code 0x8007000d.

<?xml version="1.0" encoding="UTF-8"?>

Delete this line from your web.config file.

This is a malformed XML element.

Delete it or comment it.

answered on Stack Overflow Apr 20, 2017 by HiMesh NaGar

just create new site collection and replace the new web.config to the corrupted one, work for me thought

answered on Stack Overflow Jul 24, 2013 by ayep

Please install two exe files "dotnet-sdk-3.1.102-win-x64" and "dotnet-hosting-3.1.1-win".

answered on Stack Overflow Apr 13, 2021 by Ananta Maharjan

User contributions licensed under CC BY-SA 3.0