168

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.

Community
  • 1
  • 1
David
  • 3,957
  • 2
  • 28
  • 52
  • 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. – PGardockiDotNet Apr 19 '18 at 19:11
  • 1
    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. – tr00st May 12 '21 at 08:58
  • 2
    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! – opis-kladno May 18 '21 at 21:15

21 Answers21

358

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.

Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
  • 36
    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 :) – Alex Jun 05 '14 at 10:11
  • 19
    Thanks. Added **"Url Rewrite 2.0"** via *Web Platform Installer* then fixed. – Cihan Yakar Apr 10 '15 at 11:13
  • 1
    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! – anton Aug 22 '16 at 03:41
  • 9
    Good, even Web Platform said it has been "installed", however, it didn't show in the IIS, I go here http://www.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". – Box Very Sep 19 '16 at 22:47
  • 1
    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. – Anil Gupta Nov 19 '17 at 18:18
  • How do I reinstall URL rewrite? It's already installed and there's no option in the web platform installer to re-install. – Daniel Jackson May 07 '18 at 18:17
  • 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? – Ed Greaves Oct 25 '18 at 16:12
  • Exactly what i was looking for – Atta H. Jun 02 '20 at 22:44
  • @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). – toni Mar 03 '21 at 08:25
48

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

Adrian Carr
  • 3,061
  • 1
  • 34
  • 38
  • 4
    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 https://learn.microsoft.com/en-us/aspnet/core/publishing/iis – muhihsan Apr 26 '17 at 04:43
  • 1
    This is for all versions of Core, not just 1.0. (Core needs to be installed on the server.) – Patrick Aug 08 '18 at 00:23
  • 1
    That worksd for me after trying everything else. Thanks. – Andrew Apr 16 '19 at 09:06
  • to get the latest version, you can go here https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-2.1#direct-download-current-version – Leonard AB May 24 '19 at 07:28
  • 2
    Thanks for this, I was able to get it working by running a Repair of my DotNetCore installation. – Shane Jul 04 '19 at 07:50
  • Used this solution for .net core 2.2 – Ken Nov 26 '19 at 16:44
  • works on .net core 3.1 as well. You might also need to run iisreset – oliverdejohnson Mar 09 '21 at 15:45
  • 1
    I have something like "aspNetCore" and "dotnet.exe" in my web.config, and I got same problem, now it works with your fix, thanks. – Jun Ge Aug 10 '21 at 11:24
46

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

VivekDev
  • 20,868
  • 27
  • 132
  • 202
  • 5
    This is very useful answer. Thanks for sharing – Sohail Shahzad May 23 '21 at 07:02
  • 4
    Yes, it worked for me. My configuration: iis10,win2019,.net core 5.Thanks for sharing solution – Yogesh Patil Aug 26 '21 at 16:13
  • This worked for me with .net core 3.1, iis10, Windows 70 Version 12H2 build 19044.1645 – SpicyCatGames Aug 10 '22 at 06:31
  • Unfortunately for those like me that had this problem, we'll skip over this answer. We'll never try this on a new Azure Windows 2022 VM that has the IIS role configured because we know it is already installed and if you look in add/remove programs, sure enough, the latest web hosting pack is already installed. Problem is, there is a known bug and downloading and re-installing the latest hosting pack fixes this issue. – Post Impatica Jan 13 '23 at 15:53
  • I needed to reinstall .net 7. It was installed before, but then we exported the configuration of an other IIS server and imported it. Got the same exact error. – RokX Mar 28 '23 at 09:38
28

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

Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206
  • 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. – Luke Apr 17 '18 at 22:04
25

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
max
  • 9,708
  • 15
  • 89
  • 144
10

In my case (.Net Core Web API) for this issue HTTP Error 500.19 – Internal Server Error 0x8007000d

First download dotnet-hosting-3.0.0-preview5-19227-01-win (.Net Core 3) or dotnetcore 2 hasting windows

https://download.visualstudio.microsoft.com/download/pr/5bed16f2-fd1a-4027-bee3-3d6a1b5844cc/dd22ca2820fadb57fd5378e1763d27cd/dotnet-hosting-3.1.4-win.exe

Any .net core 3.1 application either angular or mvc application would need this.

Second install it as Administrator Open cmd as administrator, type iisreset, press enter

So refresh your localhost app

Best regard M.M.Tofighi from Iran

Pani
  • 125
  • 2
  • 15
persi man
  • 101
  • 1
  • 2
8

Installing ASP.NET Core Runtime Hosting Bundle solved the issue for me. Source: 500.19 Internal Server Error (0x8007000d)

Ned
  • 1,055
  • 9
  • 34
  • 58
6

A repair of the DotNetCore hosting bundle did the trick for me. :/

IAmCoder
  • 3,179
  • 2
  • 27
  • 49
5

Kind of late to the party here, but I have just been struggling with the exact same issue (symptoms) and cursing the lack of error detail reporting. It worked fine on IIS 8+ machines but Win 7 got these INSTANT HTTP 500.19 errors. For me it was as silly as having an unsupported configuration element in the config file:

 <applicationInitialization doAppInitAfterRestart="true">
  <add initializationPage="/" />
</applicationInitialization>

So while running old web.config files worked fine, I just diffed them and started chopping away at new blocks until I got the page to start loading. Had I seen this as an answer I would have gone this route immediately as I knew none of the popular solutions were relevant. So there you go :)

barbatron
  • 123
  • 1
  • 6
2

I turn on .Net Framework 3.5 and 4.5 Advance Service in Control Panel->Programs and Features->Turn Windows features on or off.it work for me.

Saeed
  • 3,294
  • 5
  • 35
  • 52
1

Problem solved. Here are the steps that I tried:

  • Enable the 32-bit application in IIS -> Application pool -> Advanced settings
  • Copy System.EnterpriseServices.dll and System.EnterpriseServices.Wrapper.dll from C:\Windows\Microsoft.NET\Framework\v2.0.50727 to the application bin folder
  • Do comments/uncomments to sections on the web.config and found that problem related to the referenced DLL.

The config that I commented the previous one that I added:

<section name="handlers" overrideModeDefault="Allow" /> 
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow"/>
  • Add the required FasterFlect.DLL used by Combres.DLL v2.1.0.0 to the application bin folder (shall download the full zip from Combres codeplex, because the required fasterflect DLL V2.0.3732.24338 cannot be found in fasterflect codeplex) and other DLLs. For convinience, use the full Combres.DLL (1,3MB)
  • Check that the DLL versions and public key tokens are configured correctly in web.config using tool, e.g. .NET Reflector
David
  • 3,957
  • 2
  • 28
  • 52
1

I understand that this error can occur because of many different reasons. In my case it was because I uninstalled WSUS service from Server Roles and the whole IIS went down. After doing a bit of research I found that uninstalling WSUS removes a few dlls which are used to do http compression. Since those dlls were missing and the IIS was still looking for them I did a reset using the following command in CMD:

appcmd set config -section:system.webServer/httpCompression /-[name='xpress']

Bingo! The problem is sorted now. Dont forget to run it as an administrator. You might also need to do "iisreset" as well. Just in case.

Hope it helps others. Cheers

Sabbir Hassan
  • 175
  • 14
0

I had this problem with a brand new web service. Solved it by adding read-only access for Everyone on Properties->Security for the folder that the service was in.

aherocalledFrog
  • 831
  • 9
  • 13
0

I had the exact same error. It turned out that it was caused by something completely different, though. It was missing write permissions in a cache folder. But IIS reported error 0x8007000d which is wildly confusing.

marlar
  • 3,858
  • 6
  • 37
  • 60
  • Could you list down the steps, where is the cache folder, and w hat permissions you had to give, so I could try this? – Edgaras Mar 09 '23 at 16:55
  • @Edgaras Oh, it's almost three years ago, I can't remember exactly. However, there was a folder that the website needed to write to (cache files in this case, but it could be anything) and the given folder was not writable. I had to make it writable using the IIS Manager interface. – marlar Mar 10 '23 at 17:20
0

I have the same problem when I was trying to publish asp.net core 5.0 web app on my local IIS and the solution was to add the following inside System.webserver tag in my web.config file

<applicationInitialization doAppInitAfterRestart="true">
  <add initializationPage="/" />
</applicationInitialization>
Khalid
  • 343
  • 3
  • 16
0

Reinstalling ASP.NET Core Runtime - Windows Hosting Bundle Installer made the trick for me... I belive the "ASP.NET Core Module" was missing.

0

For me I had a web.config file in one my root folders, this config file was for the live server so removing it allowed the site to run on the dev server.

So check for any web.config files in folders too.

Bodkins
  • 51
  • 3
0

In my case, i have installed dotnet hosting but error change to HTTP Error 503. The service is unavailable, but after install windows update KB2999226 and dotnet sdk, its work!

0

follow the procedure chronologically or it might fail due to missing or errors in redirecting.

  1. install Runtime bundle e.g.. dotnet-sdk-7.0....

2.turn asp services on and internet services"Turn Windows features on or off" to enable IIS

3.install web hosting bundle iis 7.0 e.g dotnet-hosting-7.0.2...

this worked for me

0

Please follow these steps to install and configure .NET 7.0 on Windows:

Go to https://dotnet.microsoft.com/en-us/download/dotnet/7.0

  1. Install Windows Hosting Bundle .
  2. Close IIS and then reopen it.
  3. Click on the server node in IIS.
  4. Go to Modules.
  5. If the installation is correct, you should see "AspNetCoreModuleV2" listed.
Hesham Yemen
  • 437
  • 5
  • 6
  • Hi, Hesham Yemen. Your two most recent answers over the last few days appear likely to be entirely or partially written by AI (e.g., ChatGPT). Please be aware that [posting AI-generated content is not allowed here](//meta.stackoverflow.com/q/421831). If you used an AI tool to assist with any answer, I would encourage you to delete it. We do hope you'll stick around and continue to be a valuable part of our community by posting *your own* quality content. Thanks! – NotTheDr01ds Jul 22 '23 at 20:01
  • **Readers should review this answer carefully and critically, as AI-generated information often contains fundamental errors and misinformation.** If you observe quality issues and/or have reason to believe that this answer was generated by AI, please leave feedback accordingly. – NotTheDr01ds Jul 22 '23 at 20:01
-2

For me, it was all about setting up my web server to use the latest-and-greatest tech to support my ASP.NET 5 application!

The following URL gave me all the tips I needed:

https://docs.asp.net/en/1.0.0-rc1/publishing/iis-with-msdeploy.html

Hope this helps :)

Jeff Moretti
  • 613
  • 5
  • 6