Error 500.19 with 0x8007000d when running ASP.NET Core app in IIS despite AspNetCoreModule being installed
Having ruled out everything app-specific that I (and the many helpful commenters, especially Daboul) could think of, and having reviewed the visible IIS settings, I resorted to looking at the primary configuration file for IIS as a whole: applicationHost.config
Per Introduction to ApplicationHost.config, this file is located in %windir%\system32\inetsrv\config
. Since the real application is working on a different machine at my office, I compared them using a diff program, and found that the following node was missing from my configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<!-- ...lots of other stuff... -->
<sectionGroup name="system.webServer">
<!-- ...lots of other stuff... -->
<!--This "section" node for aspNetCore is the one that was missing-->
<section name="aspNetCore" overrideModeDefault="Allow" />
Adding that one node resolved the error.
Oddly enough, the AspNetCoreModule itself is referenced multiple times later in the file. Since I haven't manually edited this file before, it seems possible that this was some kind of installation error when installing the AspNetCoreModule the first time.
Installing the .NET Core Hosting Bundle resolved the problem for me. Here is a link to the .NET Core Hosting Bundle.
Using .NET Core 3.1
I tried using the above suggestion, but didn't work. So, I reinstalled the Asp Net Core Runtime Hosting in Administrator Mode, and my ApplicationHost.Config got corrected.