title: HTTP Error 500.19 with 0x8007000d on IIS7 "Malformed XML" in web.config
body: <p>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...</p>
  
  <blockquote>
    <p><strong>HTTP Error 500.19 - Internal Server Error</strong> The requested page cannot be accessed because the related configuration data for the page is invalid. Error Code    0x8007000d</p>
  </blockquote>
  
  <p>When I <a href="http://support.microsoft.com/kb/942055" rel="noreferrer">look up error code 0x800700d</a> it tells me...</p>
  
  <blockquote>
    <p><strong>Analysis:</strong> 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.</p>
  </blockquote>
  
  <p>Then offers a resolution of...</p>
  
  <blockquote>
    <p><strong>Suggested Solution:</strong> Delete the malformed XML element from the ApplicationHost.config file or from the Web.config file.</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>For reference, here's the contents of my web.config...</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!-- this file can be deleted if you're not planning on using URL rewriting with IIS 7. --&gt;
  &lt;!-- you can add your own files and folders that should be excluded from URL rewriting by adding them to the "pattern" below. --&gt;
  &lt;!-- please read the online documentation on http://cfwheels.org for more information about URL rewriting. --&gt;
  
  &lt;!-- SET ENABLED TO TRUE BELOW TO TURN ON THE URL REWRITING RULES --&gt;
  
  &lt;configuration&gt;
  &lt;system.webServer&gt;
      &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="ColdFusion on Wheels URL Rewriting" enabled="true"&gt;
                  &lt;match url="^(.*)$" ignoreCase="true" /&gt;
                  &lt;conditions logicalGrouping="MatchAll"&gt;
                      &lt;add input="{SCRIPT_NAME}" negate="true" pattern="^/(flex2gateway|jrunscripts|cfide|cfformgateway|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.*$)" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Rewrite" url="/rewrite.cfm/{R:1}" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
  &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Anyone have any ideas about how to resolve this issue?</p>