在web.config中,IIS7上的HTTP错误500.19,包含0x8007000d "Malformed XML"。

问题描述 投票:23回答:5

我被迫从出厂默认值重建我的机器。一切都应该是一样的,IIS版本(7.5),操作系统(Windows 7),以及我的网站文件。然而,有些东西是不同的,因为在配置我的网站和拉动本地网站在我的浏览器,我得到以下错误......

HTTP错误500.19 - 内部服务器错误 由于页面的相关配置数据无效,所以无法访问请求的页面。错误代码 0x8007000d

当我 查询错误代码0x800700d 它告诉我...

分析:这个问题的出现是因为ApplicationHost.config文件或Web.config文件中包含了错误的XML元素。 这个问题的发生是因为ApplicationHost.config文件或Web.config文件包含了一个错误的XML元素。要解决这个问题,请看解决方法1。

然后提供解决...

建议的解决方案。 从ApplicationHost.config文件或Web.config文件中删除畸形的XML元素。

然而,我没有看到任何畸形的XML,当我完全删除web.config文件时,网站加载了,但URL重写没有工作(显然)。此外,即使我从web.config文件中删除所有的XML,使其为空白,我也会得到同样的错误。这似乎与web.config文件存在的事实有关。

作为参考,以下是我的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>

有谁知道如何解决这个问题?

iis-7 cfwheels
5个回答
29
投票

你是否记得重新安装了 重写模块? IIS 7.5默认不包含这个功能。

除此之外,这里还有一个 类似问题 - 我认为关于畸形的部分是一个红鲱鱼。


3
投票

经过这么多的痛苦,我可以解决这个错误。我的实际原因是我在配置中使用了一些url重写。删除后,错误已经消失了。下面是我从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>

-1
投票

在web.config文件中,在文件的顶部,有一个xml的部分,把下面的内容删掉,这样就解决了我的问题,以后网站就可以打开了。

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


-1
投票

我也出现了这个问题......试试这个错误代码0x8007000d。

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

从你的web.config文件中删除这一行。

这是一个畸形的XML元素。

删除它或注释它。


-2
投票

只需创建新的站点集合,然后将新的web.config替换为损坏的web.config,对我来说是可行的。

© www.soinside.com 2019 - 2024. All rights reserved.