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

6

27

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?

Accurate answered 3/1, 2013 at 1:49 Comment(1)
We have two servers who do not like 'encoding="UTF8"'. Another server does not have any problems with it. Still have no idea why.Gentleman
A
35

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.

Adim answered 4/1, 2013 at 1:33 Comment(1)
Thank you JohnW! I did finally resolve this issue. I did have the rewrite module installed, but after reading through the link you sent me and all the related links posted in that, I figured it could be one of two things... 1) AJAX wasn't installed properly 2) the rewrite module wasn't installed properly. So, I reinstalled .NET then reinstalled the rewrite module and it's working fine now. Maybe I had installed the rewrite module before .NET last time... not sure.Accurate
H
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>
Howlet answered 13/6, 2015 at 19:30 Comment(0)
W
-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>

Whited answered 19/4, 2013 at 10:11 Comment(0)
H
-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.

Huberty answered 20/4, 2017 at 8:7 Comment(1)
What also worked for me was only removing the 'encoding="UTF-8"' portion, or changing it to UTF-16. (I am running inside a docker container. Not sure how my file became UTF-16.)Contiguous
S
-2

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

Silverplate answered 24/7, 2013 at 1:14 Comment(0)
A
-2

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

Almund answered 13/4, 2021 at 16:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.