locked
Need help with resolving Http error 500.31 on IIS RRS feed

  • Question

  • User446393772 posted

    Hello,
    How are you doing?
    I am following this tutorial https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1

    for deploy Asp.net core 3.1 web app to IIS and I encountered this issue.
    I installed the asp.Net Core 3.1.1- Windows Hosting Bundle(the installer ran, bit I dont know if this is installed in this IIS server), .Net Core SDK 3.1.100(x64), .Net Core SDK 3.1.1001(x64) from Visual Studio on my laptop. I got this when I navigate to the localhost.

    HTTP Error 500.31 - ANCM Failed to Find Native Dependencies

    Common solutions to this issue:

    The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

    Troubleshooting steps:

    • Check the system event log for error messages
    • Enable logging the application process' stdout messages
    • Attach a debugger to the application process and inspect



    In the tutoiral It asked me to install the hosting bundle on the server, but how do I run the installer on the iis server?  I apologize I am not a IIS expert.
    I dont know where to find the IIS manage "Console" for running the

    net stop was /y
    net start w3svc

    commands neither. Thank you.

    Monday, February 10, 2020 7:42 PM

Answers

  • User-474980206 posted

    this looks like your dev box, not the IIS server. you need to remote login to the IIS server and run the commands.

    how you remote will depends on what features are installed on the IIS server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 14, 2020 5:36 PM

All replies

  • User-782232518 posted

    deploy Asp.net core 3.1 web app to IIS

    Please open .deps.json in the artifacts folder to tell what's the required version of Microsoft.AspNetCore.App. Then run dotnet --info to see if you have that on the hosting machine.

    Pay attention to bitness (32/64 bit) as well, as bitness must match.

    Tuesday, February 11, 2020 2:37 AM
  • User711641945 posted

    Hi RaymondLei,

    For deploy asp.net core 3.1 application on IIS,you need to make sure that you have installed the following package:

    Reference:  https://dotnet.microsoft.com/download/dotnet-core/3.1

    Could you  run command `dotnet --info` on your PMC and show it to us. Please remember do not leak your privacy.

    Best Regards,

    Rena

    Tuesday, February 11, 2020 7:54 AM
  • User446393772 posted

    Hello,

    Please open .deps.json in the artifacts folder to tell what's the required version of Microsoft.AspNetCore.App. Then run dotnet --info to see if you have that on the hosting machine.

    I opend the .deps,json file and I saw these fields 
    "runtimeTarget": {
    "name": ".NETCoreApp,Version=v3.1",
    "signature": ""
    },
    "compilationOptions": {
    "defines": [
    "TRACE",
    "RELEASE",
    "NETCOREAPP",
    "NETCOREAPP3_1"
    ],
    "languageVersion": "",
    "platform": "",
    "allowUnsafe": false,
    "warningsAsErrors": false,
    "optimize": true,
    "keyFile": "",
    "emitEntryPoint": true,
    "xmlDoc": false,
    "debugType": "portable"
    },
    "targets": {
    ".NETCoreApp,Version=v3.1": {
    ..... nuget library dependencies
    }

    Friday, February 14, 2020 4:01 PM
  • User446393772 posted

    Could you  run command `dotnet --info` on your PMC and show it to us.

    Hello, I ran the command and I got the following:

    .NET Core SDK (reflecting any global.json):
    Version: 3.1.101
    Commit: b377529961

    Runtime Environment:
    OS Name: Windows
    OS Version: xxxxxxxxx
    OS Platform: Windows
    RID: win10-x64
    Base Path: C:\Program Files\dotnet\sdk\3.1.101\

    Host (useful for support):
    Version: 3.1.1
    Commit: a1388f194c

    .NET Core SDKs installed:
    1.1.14 [C:\xxxxxxxxxxxxx]
    2.1.202 [C:\xxxxxxxxxxxxx]
    2.1.509 [C:\xxxxxxxxxxxxx]
    2.1.511 [C:\xxxxxxxxxxxxx]
    2.2.402 [C:\xxxxxxxxxxxxx]
    3.0.100 [C:\xxxxxxxxxxxxx]
    3.1.100 [C:\xxxxxxxxxxxxx]
    3.1.101 [C:\xxxxxxxxxxxxx]

    .NET Core runtimes installed:
    Microsoft.AspNetCore.All 2.1.13 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.All 2.1.15 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.All 2.2.7 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.App 2.1.13 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.App 2.1.15 [C:\xxxxxxxxxxxxxp]
    Microsoft.AspNetCore.App 2.2.7 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.App 3.0.0 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.App 3.1.0 [C:\xxxxxxxxxxxxx]
    Microsoft.AspNetCore.App 3.1.1 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 1.0.16 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 1.1.13 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 2.0.9 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 2.1.13 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 2.1.15 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 2.2.7 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 3.0.0 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 3.1.0 [C:\xxxxxxxxxxxxx]
    Microsoft.NETCore.App 3.1.1 [C:\xxxxxxxxxxxxx]
    Microsoft.WindowsDesktop.App 3.0.0 [C:\xxxxxxxxxxxxx]
    Microsoft.WindowsDesktop.App 3.1.0 [C:\xxxxxxxxxxxxx]
    Microsoft.WindowsDesktop.App 3.1.1 [C:\xxxxxxxxxxxxx]

    Friday, February 14, 2020 4:20 PM
  • User-474980206 posted

    this looks like your dev box, not the IIS server. you need to remote login to the IIS server and run the commands.

    how you remote will depends on what features are installed on the IIS server.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 14, 2020 5:36 PM