代码之家  ›  专栏  ›  技术社区  ›  Bill

试图添加。NET Core 2.1到我的本地IIS

  •  1
  • Bill  · 技术社区  · 5 年前

    > 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)
    

    我希望“AspNetCoreModule”出现在列表中,但没有列出任何内容。

    1 回复  |  直到 5 年前
        1
  •  1
  •   Dai    5 年前

    不要使用 https://dotnet.microsoft.com/download/dotnet 安装。NET Core for IIS,因为该页面(截至2021年6月)仅链接到桌面运行时,而不是IIS版本。

    相反,您需要的是“托管包”又名“ASP.NET核心运行时”,它链接到 https://dotnet.microsoft.com/download/dotnet/2.1

    的托管捆绑包的当前链接。NET Core 2.1是 https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-aspnetcore-2.1.28-windows-hosting-bundle-installer

    之后,你需要确保你的网站 web.config (不是你的 应用 是的 网状物配置 )(可能还有你的 applicationHost.config ) are using AspNetCoreModuleV2 (and not AspNetCoreModule ) .


    此外,您应该确保您的“Windows功能”设置(或Windows Server上的“角色和功能”)已启用必要的功能,例如ISAPI扩展和ISAPI过滤器。