0

I'm looking to add .NET Core 2.1 to my local IIS but not seeing it show up. Core installed but not showing in IIS. Steps below:

> Download:    https://dotnet.microsoft.com/download/dotnet
> .Net Core 2.1 > Windows x64 > MSI version
> Reboot
> looking in IIS (IIS > default website > Features View > Modules)

I'm expecting "AspNetCoreModule" to show up in the list but nothing listed.

Bill
  • 915
  • 2
  • 13
  • 23
  • Does this answer your question? [asp.net core web api published in IIS after moved to different IIS server pc gives error 500.19 (0x8007000d)](https://stackoverflow.com/questions/49034308/asp-net-core-web-api-published-in-iis-after-moved-to-different-iis-server-pc-giv) – Lex Li Jun 12 '21 at 00:15
  • Lex Li - I'm not sure about a web.config issue yet. I have not actually published. As a pre-requisite, I was hoping the see the module listed before attempting the publish. – Bill Jun 12 '21 at 00:22
  • 1
    **Exactly which** .NET Core 2.1 runtime did you download? For IIS you need the "Hosting Bundle" which is not linked to from https://dotnet.microsoft.com/download/dotnet - get it from here: https://dotnet.microsoft.com/download/dotnet/2.1 – Dai Jun 12 '21 at 00:23
  • It's in the description: https://dotnet.microsoft.com/download/dotnet > .Net Core 2.1 > Windows x64 > MSI version – Bill Jun 12 '21 at 00:24
  • 1
    "I was hoping" doesn't work out here. You might hit many common issues, but none of them easily escape from a report https://docs.jexusmanager.com/tutorials/ancm-diagnostics.html – Lex Li Jun 12 '21 at 00:25
  • 1
    `AspNetCoreModule` is obsolete - you should be using `AspNetCoreModuleV2` (which, confusingly, is also used for ASP.NET Core 3, 4, 5 and 6+). – Dai Jun 12 '21 at 00:26
  • Looks like I just picked the wrong one. Picked SDK over ASP.NET. Will find out soon if that is the issue. – Bill Jun 12 '21 at 00:27
  • Still an issue. It doesn't matter if I install the SDK version or the ASP.NET only version. Still no AspNetCoreModule or AspNetCoreModule2 under IIS. – Bill Jun 12 '21 at 00:44
  • Finally got it to work. Used the x86 version instead of x64. – Bill Jun 12 '21 at 00:48

1 Answers1

1

Don't use https://dotnet.microsoft.com/download/dotnet to install .NET Core for IIS, as the page (as of June 2021) only links to the desktop runtime, not the edition for IIS.

Instead you need the "Hosting Bundle" aka "ASP.NET Core Runtime" instead, which is linked to from https://dotnet.microsoft.com/download/dotnet/2.1

The current link for the Hosting Bundle for .NET Core 2.1 is https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-aspnetcore-2.1.28-windows-hosting-bundle-installer

Afterwards, you need to ensure that your website's web.config (not your application's web.config) (and possibly your applicationHost.config) are using AspNetCoreModuleV2 (and not AspNetCoreModule).


Additionally, you should ensure your "Windows Features" settings (or "Roles and Features" on Windows Server) have the requisite features enabled, such as ISAPI Extensions and ISAPI Filters.

Dai
  • 141,631
  • 28
  • 261
  • 374