At this point, I get no error when I install the 2.1 hosting bundling, but the AspNetCoreModule is never registered in applicationhost.config.
I do know we replicated the problem on two different machines (pretty much up-to-date Windows 10 Pro), so that seems odd.
To the best of my knowledge, this is what happened. I was the third developer called in to figure this out after the previous two developers spent ~4 hours on it.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
I believe I tracked the problem down to AspNetCoreModule is not registered in applicationhost.config. Again, I got no error during the installation of the 2.1 hosting bundle. I've repaired the install, uninstalled, reinstalled, uninstalled all .NET Core entries, uninstalled IIS, reinstalled IIS, reinstalled the runtime, and every combination therein. Still, the AspNetCoreModule does not get registered.
I'm pretty sure AspNetCoreModule needs to be registered for the application to start.
I found several other such incidents on the internet going as far back as .NET 1.1. However, I could not find where anyone actually resolved the problem. I'm happy to let someone from MS into the computer to troubleshoot.
PS C:WINDOWSsystem32> dotnet --info
Host (useful for support):
Version: 2.1.7
Commit: cca5d72d48.NET Core SDKs installed:
No SDKs were found..NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [C:Program Files (x86)dotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.7 [C:Program Files (x86)dotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [C:Program Files (x86)dotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.7 [C:Program Files (x86)dotnetsharedMicrosoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.6 [C:Program Files (x86)dotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.7 [C:Program Files (x86)dotnetsharedMicrosoft.NETCore.App]
I've seen this error show up from time to time. Can you try to getting logs from the installers from the %TEMP% directory (should start with dd_*.log) for the key word IISGlobalModule and see if there are any modifications to that section in the applicationhost.config?
I've seen this error show up from time to time.
I didn't get an error. Did you mean "problem" instead of "error"?
Can you try to getting logs from the installers from the %TEMP% directory (should start with dd_*.log)
for the key word IISGlobalModule and see if there are any modifications to that section in the applicationhost.config?
Do you mean, "Open applicationhost.config and search for IISGlobalModule and determine if modifications were made to that section"? If so, no, there is no IISGlobalModule section -- There is a globalModules section and the installer did not make any modifications to that section. On a working machine, it should have added the following entries to globalModules:
<add name="AspNetCoreModule" image="%SystemRoot%\system32\inetsrv\aspnetcore.dll" /> <add name="AspNetCoreModuleV2" image="%ProgramFiles%\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll" />
I think the goal of this issue is to figure out why it didn't add those entries and how to fix it.
For the record, here are some of the potentially useful things I found in the logs. Note that I don't know what I'm looking for, but maybe this will help someone..
DEBUG: Error 2769: Custom Action IISScheduleInstallCA did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: IISScheduleInstallCA, 1,
MSI (s) (F8:14) [13:42:29:960]: Windows Installer reconfigured the product. Product Name: Microsoft ASP.NET Core 2.1.6 Shared Framework (x64). Product Version: 2.1.13425.0. Product Language: 1033. Manufacturer: Microsoft Corporation. Reconfiguration success or error status: 0.
[2EFC:2F00][2019-01-07T11:54:16]i101: Detected package: AspNetCoreModule_x86, state: Absent, cached: None
[2EFC:2F00][2019-01-07T11:54:16]i101: Detected package: AspNetCoreModule_x64, state: Obsolete, cached: None
[2EFC:2F00][2019-01-07T11:54:18]i201: Planned package: AspNetCoreModule_x86, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[2EFC:2F00][2019-01-07T11:54:18]i201: Planned package: AspNetCoreModule_x64, state: Obsolete, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[2A90:2F2C][2019-01-08T12:59:42]i326: Removed dependency: {33058486-a618-478b-8103-1addd5b410cf} on package provider: IIS_AspNetCore_Module,x64, package AspNetCoreModule_x64
[2A90:2F2C][2019-01-08T12:59:42]i351: Removing cached package: AspNetCoreModule_x64, from path: C:ProgramDataPackage Cache{52EB917D-6633-4063-BBDE-A57FA2E51F32}v1.0.1990
Hi Folks, The section declaration that gets removed is: Let me know if anything is needed. I wasn't able to reproduce this with older versions of the hosting bundle, though I did not try all of them. EDIT: on re-reading the OP's description, this problem is slightly different, though it may have a similar or same cause. Let me know if I need to open a new issue to track this.
MS employee (CSS) here - I was able to reproduce this problem easily as well:
if uninstalling the 2.2 hosting bundle when other hosting bundles are still installed, then it removes the aspnetcore section declaration from the IIS applicationhost.config filem thus breaking the other bundles. It also removes the aspnetcore_schema.xml file from c:windowssystem32inetsrvconfigschema directory.
Once that happens, every web.config with an
<section name="aspNetCore" overrideModeDefault="Allow" />
@joeloff IIRC this is expected behavior, but it still isn't ideal.
@jkotalik Depends. Will ANCM always be removed? If the custom action writing/removing the config section is conditioned to the installstate of the module DLL itself, then when an MSI is removed, but the underlying component is ref counted, the config entry should remain. If ANCM was completely removed as part of removing the hosting bundle then this might be the expected behavior
I feel like we need to make sense out of the comments that were added recently, as I'm confused by what has been said.
@mahamr
For me, simply re-adding that line to the system.webServer sectionGroup resolved the issue, even though the schema file would still be missing.
Re-adding what line to what file?
Also, running a repair on any installed version of the bundle worked as well.
Do you mean that running a repair on the .NET 2.1 hosting bundle would resolve the problem? I don't think that worked for me.
The section declaration that gets removed is:
What file does that get removed from?
EDIT: on re-reading the OP's description, this problem is slightly different, though it may have a similar or same cause. Let me know if I need to open a new issue to track this.
I believe your issue might be similar to mine, but I need answers to those questions to know for sure.
@jkotalik
IIRC this is expected behavior, but it still isn't ideal.
Are you saying that uninstalling .NET Core 2.2 should break .NET 2.1 applications?
@joeloff
I realize you're having an internal conversation at this point, but it makes no sense to me. Not that it has to make sense to me, but I do want to make sure that we're discussing the correct problem. It's possible that @mahamr might have conflated the issue a bit if his problem is indeed different than mine. Note his comment, EDIT: on re-reading the OP's description, this problem is slightly different, though it may have a similar or same cause. Let me know if I need to open a new issue to track this..
Thanks everyone for helping make sense of this issue. Looking forward to finding a resolution, as I really don't want to have to re-format these computers just to get my .NET 2.1 applications running again.
I have a similar, if not the same, problem.
A repair of any 2.1 hosting bundle and even an uninstall/reinstall of those bundles did not resolve the issue for me.
I had to manually ensure the following was present in my applicationHost.config:
<configuration>
<configSections>
<sectionGroup name="system.webServer">
<section name="aspNetCore" overrideModeDefault="Allow" />
</sectionGroup>
</configSections>
</configuration>
All other configurations were rectified with a repair or uninstall/reinstall except the above.
Perfect fix. Spent 6 hours trying to find out why my web.config or applicationhost.config was not available to the Application Pool.
Someone needs to put this answering against the 500 19 on the microsoft page, so other people using .NET Core can see it.
Dude, thank you so much for opening this issue @alexdresko . What a nightmare. I spent HOURS trying to figure this out.
We've found that re-installing the .NET Core 2.2 runtime+hosting bundle fixes the problem, even though we only need the 2.1 runtime-hosting bundle.
We had a similar problem. When 3.0 released I converted our only core app from 2.2 to 3.0. In that process the 3.0 hosting installation when fine and the updated app worked. My server team then uninstalled 2.2 and its hosting bundle, since no one was or would be using it, and we started receiving similar 500.19 errors. The server team uninstalled 3.0 and its hosting bundle (which should've removed core completely from the system) and reinstalled the 3.0 hosting bundle to fix the issue. It wasn't at all clear to us that uninstalling 2.2 hosting after installing 3.0 hosting would cause a problem. If we run across this again we will try some of the XML fixes here.
@mahamr
I am also having a similar issue. Uninstalled 2.2, and now I believe all of our 2.1 apps no longer seem to be working. It seems like the 3.1 apps seem to be working just fine. Reinstalling 2.2 doesn't seem to fix the problem for me. I ended up restoring from a snapshot.
Thank you for contacting us. Due to a lack of activity on this discussion issue we're closing it in an effort to keep our backlog clean. If you believe there is a concern related to the ASP.NET Core framework, which hasn't been addressed yet, please file a new issue.
This issue will be locked after 30 more days of inactivity. If you still wish to discuss this subject after then, please create a new issue!
Most helpful comment
Hi Folks,
MS employee (CSS) here - I was able to reproduce this problem easily as well:
if uninstalling the 2.2 hosting bundle when other hosting bundles are still installed, then it removes the aspnetcore section declaration from the IIS applicationhost.config filem thus breaking the other bundles. It also removes the aspnetcore_schema.xml file from c:windowssystem32inetsrvconfigschema directory.
Once that happens, every web.config with an
The section declaration that gets removed is:
<section name="aspNetCore" overrideModeDefault="Allow" />Let me know if anything is needed. I wasn't able to reproduce this with older versions of the hosting bundle, though I did not try all of them.
EDIT: on re-reading the OP's description, this problem is slightly different, though it may have a similar or same cause. Let me know if I need to open a new issue to track this.