ASP.NET: HTTP Error 500.19 – Internal Server Error 0x8007000d

219,126

Solution 1

Error 0x8007000d means URL rewriting module (referenced in web.config) is missing or proper version is not installed.

Just install URL rewriting module via web platform installer.

I recommend to check all dependencies from web.config and install them.

Solution 2

When trying to set up a .NET Core 1.0 website I got this error, and tried everything else I could find with no luck, including checking the web.config file, IIS_IUSRS permissions, IIS URL rewrite module, etc. In the end, I installed DotNetCore.1.0.0-WindowsHosting.exe from this page: https://www.microsoft.com/net/download and it started working right away.

Specific link to download: https://go.microsoft.com/fwlink/?LinkId=817246

Solution 3

Install URL rewriting:

UPDATE - this is now available here (and works with IIS 7-10):

https://www.iis.net/downloads/microsoft/url-rewrite

Ensure you have the following set to 'Allowed' for your IIS server:

enter image description here

Solution 4

In my case, because I had reinstalled iis, I needed to register iis with dot net 4 using this command:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

Solution 5

Yes, for .net core apps, install dotnet hosting. This worked for me.

dotnet hosting installer exe

And here it is for .net6

And now if you need .net7

Share:
219,126
David
Author by

David

Bachelor's degree in Electrical Engineering majoring in Control. Seven years' experience as a programmer, consultant, and technical manager in smart card applications and IT solutions. Like solving puzzles and arithmetic riddles and sharing knowledge. Currently active as blogger with the following blogs: http://d-chords.blogspot.com - Indonesian songs' lyrics and guitar chords http://d-chips.blogspot.com - Knowledge about SIM cards

Updated on April 25, 2022

Comments

  • David
    David about 2 years

    I am replicating web application deployment and found several issues related to HTTP Error 500.19. My machine is running Windows 7 while the working development is using Windows 8. We're developing our Web Application using Visual Studio 2010.

    First, I got error code 0x80070021, similar as posted here. I update my web.config according to the accepted answer and then I got following error code (which is similar as posted here).

    HTTP Error 500.19 - Internal Server Error
    Error Code 0x8007000d
    Config Source -1: 0:
    

    I have read the symptoms definition in Microsoft support page and cause of the error is:

    This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element.

    and the solution is

    Delete the malformed XML element from the ApplicationHost.config file or from the Web.config file.

    However, the web.config that I used is working perfectly in the original development environment.

    Here is what I have checked and tried so far:

    1. Install ASP.NET by calling aspnet_regiis -i
    2. Set my application to use different application pool (ASP.NET v4.0, .NET v4, etc)
    3. ApplicationHost.config file is still using default from Windows 7.

    This is part of my Web.Config

    <system.webServer>
        <section name="handlers" overrideModeDefault="Allow" /> 
        <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
        </modules>
        <handlers>
            <remove name="UrlRoutingHandler" />
            <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" />
        </handlers>
        <urlCompression doStaticCompression="true" doDynamicCompression="false"></urlCompression>
        <directoryBrowse enabled="true" />
        <defaultDocument>
            <files>
                <add value="Logon.aspx" />
            </files>
        </defaultDocument>
    </system.webServer>
    

    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.

    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.

    • PGardockiDotNet
      PGardockiDotNet about 6 years
      I just fixed this problem. While the error points to the file web.config, it can be a problem with appsettings.config as well. If either are malformed you will get the same error.
    • tr00st
      tr00st about 3 years
      This error code (including no source shown) can also occur in general when there's a missing module referenced by your Web.config (eg: CORS, Rewrite) or you're using IIS Express with a config that would use one of those modules.
    • opis-kladno
      opis-kladno almost 3 years
      Doublecheck, if you installed hosting bundle on the machine. On the .NET Core download page, there are several download links: Hosting Bundle, x64, x86. When you click on the x64 you are not downloading Hosting Bundle!
  • Alex
    Alex almost 10 years
    I wish IIS would give a more descriptive error message, if it had said "Unrecognised module: UrlRewritingNet" I would have saved two hours this morning. +1 for ending my pain :)
  • Davit Bidzhoyan
    Davit Bidzhoyan about 9 years
    Thanks. Added "Url Rewrite 2.0" via Web Platform Installer then fixed.
  • Erik W
    Erik W almost 8 years
    This was my problem. Thanks!
  • mhatch
    mhatch almost 8 years
    Can you describe some of the important points contained in the link? This way the answer can remain useful if the link becomes broken or unavailable.
  • anton
    anton over 7 years
    Had the same issue, spent ages looking at "corrupt" XML files until I stumbled across this comment mentioning the URL rewriting module. That was enough to trigger my recollection of solving this exact same thing a few months ago! (I'm writing it down this time) Thanks!
  • Box Very
    Box Very over 7 years
    Good, even Web Platform said it has been "installed", however, it didn't show in the IIS, I go here iis.net/downloads/microsoft/url-rewrite, download proper version, remove the current one and re-install, close IIS and restart IIS, now I can see "URL Rewrite".
  • muhihsan
    muhihsan about 7 years
    Thanks man! This is what I need for my core applications. Those who wants to know how to host core websites in iis, you can go to docs.microsoft.com/en-us/aspnet/core/publishing/iis
  • Anil Gupta
    Anil Gupta over 6 years
    Thanks a lot. This answer saved my day. I installed 'URL rewriting' through Web platform installer on IIS 10, windows 2016 server and the error vanished.
  • Luke
    Luke about 6 years
    Thanks for the link! I installed this from the Add/Remove features, but that didn't fix it. Only downloading it from that link worked.
  • José Margaça Lopes
    José Margaça Lopes about 6 years
    I also had this issue. Thanks!
  • Daniel Jackson
    Daniel Jackson about 6 years
    How do I reinstall URL rewrite? It's already installed and there's no option in the web platform installer to re-install.
  • Patrick
    Patrick almost 6 years
    This is for all versions of Core, not just 1.0. (Core needs to be installed on the server.)
  • Ed Greaves
    Ed Greaves over 5 years
    URL Rewrite can also be found in Add and Remove Programs. I fixed my problem by going to "Uninstall a Program" and clicking "Repair". Now can someone tell me why the install needed to be repaired?
  • Andrew
    Andrew about 5 years
    That worksd for me after trying everything else. Thanks.
  • Leonard AB
    Leonard AB almost 5 years
    to get the latest version, you can go here docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/…
  • Shane
    Shane almost 5 years
    Thanks for this, I was able to get it working by running a Repair of my DotNetCore installation.
  • Ken
    Ken over 4 years
    Used this solution for .net core 2.2
  • Atta H.
    Atta H. almost 4 years
    Exactly what i was looking for
  • toni
    toni about 3 years
    @DanielJackson We also had the problem that URL Rewrite Module was installed but did not work. We uninstalled it via Control Panel (Control Panel\All Control Panel Items\Programs and Features) - there it is under the name "IIS URL Rewrite Module 2". And afterwards install it via Web Platform Installer (it needs to be reopened after uninstalling).
  • oliverdejohnson
    oliverdejohnson about 3 years
    works on .net core 3.1 as well. You might also need to run iisreset
  • Sohail Shahzad
    Sohail Shahzad almost 3 years
    This is very useful answer. Thanks for sharing
  • Jun Ge
    Jun Ge almost 3 years
    I have something like "aspNetCore" and "dotnet.exe" in my web.config, and I got same problem, now it works with your fix, thanks.
  • Yogesh Patil
    Yogesh Patil over 2 years
    Yes, it worked for me. My configuration: iis10,win2019,.net core 5.Thanks for sharing solution
  • Robbie Matthews
    Robbie Matthews almost 2 years
    This turned out to be my issue. JFC, would it kill Microsoft to have meaningful error messages?