我被迫从出厂默认状态重新构建我的计算机。一切都应该是一样的,IIS版本(7.5),操作系统(Windows 7)和我的网站文件。然而,有些东西不同,因为在配置了我的网站并在浏览器中打开本地站点后,我收到以下错误信息...
HTTP Error 500.19 - Internal Server Error 请求的页面无法访问,因为页面的相关配置数据无效。错误代码0x8007000d
当我查看错误代码0x800700d时,它告诉我...
分析:此问题发生的原因是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>
有人对如何解决这个问题有什么想法吗?