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

26

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 http://cfwheels.org for more information about URL rewriting. -->

<!-- SET ENABLED TO TRUE BELOW TO TURN ON THE URL REWRITING RULES -->

<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <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)($|/.*$)" />
                </conditions>
                <action type="Rewrite" url="/rewrite.cfm/{R:1}" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>

Anyone have any ideas about how to resolve this issue?

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

6 Answers

33

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
4

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"/>
<rewrite>
  <rules>
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
      <match url="(.*)"/>
      <conditions>
        <add input="{HTTPS}" pattern="off" ignoreCase="true"/>
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="https://wikigurus.com/{R:1}"/>
    </rule>
  </rules>
</rewrite>
answered on Stack Overflow Jun 13, 2015 by chindirala sampath kumar • edited Oct 1, 2015 by Liam
-1

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.

<system.net>
<defaultProxy>
  <proxy autoDetect="true" />
</defaultProxy>

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

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
-2

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
-2

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