IIS Fails for Asp.net 3.1 core site with runtime and hosting bundles installed

0

Ok I am pulling my hair out here I have come across this before. I have the following error. But I have them installed and .net core when I go to the links try and re install it says I already have the components installed only seems to be when I publish to iis is when I have an issue.

This iis is on my local windows ten machine If I send the app up to azure its fine and works as should even though all .net components are installed including the hosting.

The application also runs fine in iis express.

I have the hosting and bundles installed. I have the configuration of my publish as follows.

enter image description here

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure Common solutions to this issue: The application process failed to start The application process started but then stopped The application process started but failed to listen on the configured port 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

I get the following when I browse to the event viewer. I have my application pool setup ok enter image description here

Application '/LM/W3SVC/2/ROOT' with physical root 'C:\inetpub\wwwroot\roundtableapi\' failed to start process with commandline 'C:\inetpub\wwwroot\roundtableapi\RoundTableWeb.Api.exe ' with multiple retries. Failed to bind to port '18223'. First 30KB characters of captured stdout and stderr logs from multiple retries: Failed to load the dll from [C:\inetpub\wwwroot\roundtableapi\hostfxr.dll], HRESULT: 0x800700C1 The library hostfxr.dll was found, but loading it from C:\inetpub\wwwroot\roundtableapi\hostfxr.dll failed - Installing .NET Core prerequisites might help resolve this problem. https://go.microsoft.com/fwlink/?linkid=798306 Failed to load the dll from [C:\inetpub\wwwroot\roundtableapi\hostfxr.dll], HRESULT: 0x800700C1 The library hostfxr.dll was found, but loading it from C:\inetpub\wwwroot\roundtableapi\hostfxr.dll failed - Installing .NET Core prerequisites might help resolve this problem. https://go.microsoft.com/fwlink/?linkid=798306

c#
iis
asked on Stack Overflow Apr 4, 2020 by rogue39nin

1 Answer

1

To extend the discussion in comments,

  • ASP.NET Core on IIS does not require self-contained deployment, since the runtime is always installed as part of server bundle with ASP.NET Core module.
  • If you do choose self-contained deployment, then the application pool bitness must match the bitness of your bundled runtime (win-x86 in your case). This is critical as ASP.NET Core 3.x uses in-process hosting by default.

IIS Express runs your project in a very different way, so it won't show you any such issue.

answered on Stack Overflow Apr 5, 2020 by Lex Li

User contributions licensed under CC BY-SA 3.0