title: ASP.NET: HTTP Error 500.19 – Internal Server Error 0x8007000d
body: <p>I am replicating web application deployment and found several issues related to <code>HTTP Error 500.19</code>. My machine is running <strong>Windows 7</strong> while the working development is using <strong>Windows 8</strong>. We're developing our Web Application using <strong>Visual Studio 2010</strong>.</p>
  
  <p>First, I got error code <code>0x80070021</code>, similar as posted  <a href="https://stackoverflow.com/questions/2138285/asp-net-iis-web-config-internal-server-error">here</a>.
  I update my web.config according to the accepted answer and then I got following error code (which is similar as posted <a href="https://stackoverflow.com/questions/10801340/http-error-500-19-internal-server-error">here</a>).</p>
  
  <pre><code>HTTP Error 500.19 - Internal Server Error
  Error Code 0x8007000d
  Config Source -1: 0:
  </code></pre>
  
  <p>I have read the symptoms definition in <a href="http://support.microsoft.com/kb/942055" rel="noreferrer">Microsoft support page</a> and cause of the error is: </p>
  
  <p><em>This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element.</em> </p>
  
  <p>and the solution is</p>
  
  <p><em>Delete the malformed XML element from the ApplicationHost.config file or from the Web.config file.</em></p>
  
  <p>However, the web.config that I used is working perfectly in the original development environment.</p>
  
  <p>Here is what I have checked and tried so far:</p>
  
  <ol>
  <li>Install ASP.NET by calling aspnet_regiis -i </li>
  <li>Set my application to use different application pool (ASP.NET v4.0, .NET v4, etc)</li>
  <li>ApplicationHost.config file is still using default from Windows 7.</li>
  </ol>
  
  <p>This is part of my Web.Config</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;section name="handlers" overrideModeDefault="Allow" /&gt; 
      &lt;section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" /&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
      &lt;/modules&gt;
      &lt;handlers&gt;
          &lt;remove name="UrlRoutingHandler" /&gt;
          &lt;add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
      &lt;/handlers&gt;
      &lt;urlCompression doStaticCompression="true" doDynamicCompression="false"&gt;&lt;/urlCompression&gt;
      &lt;directoryBrowse enabled="true" /&gt;
      &lt;defaultDocument&gt;
          &lt;files&gt;
              &lt;add value="Logon.aspx" /&gt;
          &lt;/files&gt;
      &lt;/defaultDocument&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>I have read similar/duplicates/closed posts (around 13) posts in stackoverflow, tried all except the answer related to Ajax (is it related) and still have no clue on what the error is.</p>
  
  <p>Does anyone one how to fix this error? (And if possible, a comprehensive lists of things need to be checked so we can reduce similar posts like this.) I am ready to provide more details.</p>