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.