IIS AspNetCore Module V2: Failed to start application '/LM/W3SVC/1/ROOT', ErrorCode '0x8000ffff'

Boris Dzevel 21 Reputation points
2022-05-19T15:05:55.903+00:00

I have a .NET Core 3.1 Web API project that I am hosting using IIS. Project Details (see target framework):

<Project Sdk="Microsoft.NET.Sdk.Web">  
  <PropertyGroup>  
    <TargetFramework>netcoreapp3.1</TargetFramework>  
...  
    <SignAssembly>true</SignAssembly>  
    <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>  
  </PropertyGroup>  
.....  
</Project>  

I am experiencing an error in my local development environment - I'm not aware of anyone else on the team or other environments that are experiencing the same issue.

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
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526

203784-image.png

Event Viewer shows the following 3 errors when this occurs. Full detail in file below.

  1. Unable to locate application dependencies. Ensure that the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App targeted by the application are installed.
  2. Could not find 'aspnetcorev2_inprocess.dll'. Exception message: (BLANK - error cuts off here)
  3. Failed to start application '/LM/W3SVC/1/ROOT', ErrorCode '0x8000ffff'.

Note: Regarding aspnetcorev2_inprocess.dll error - I checked procmon for errors here and I do not see any entry for this file at all. Leads me to believe the error is misleading.
203775-image.png

203763-eventviewer.txt

I've installed the .NET Core 3.1 SDK and the Windows Hosting Bundle found here: https://dotnet.microsoft.com/en-us/download/dotnet/3.1

203764-image.png

I also have .NET SDK 5, .NET SDK 6, .NET Framework 4.6, .NET Framework 4.8 installed side-by-side. We have projects that run the gamut. I can provide specific detail here if needed.

Some version info:

Windows Version 21H2 (19044.1706)
IIS Version 10.0.19041.1

203700-image.png

I'm not sure what other troubleshooting can be done here. Any ideas?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,815 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,215 questions
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 74,696 Reputation points
    2022-05-20T00:40:37.427+00:00

    for IIS to host asp.net core, you need the physical path to be a published folder. the publish folder should have the application dll's, appsettings.json, web.config and the wwwroot folder at the root.

    first create a publish folder (default is in the bin folder)

    dotnet publish

    then change IIS physical location to the publish folder in the bin folder


4 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 74,696 Reputation points
    2022-05-19T15:14:10.923+00:00

    on the server run

    dotnet --list-runtimes

    check that 3.1 and 6/0 runtimes exist. also check the latest aspnetcore.app 3.* and 6.* has a matching NetCore.app version. there was a sp that broke this.


  2. Bruce (SqlWork.com) 74,696 Reputation points
    2022-05-19T20:03:33.017+00:00

    I'd reinstall the core module:

    https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-6.0

    the core 6 version supports 3.1 as long as the runtime is installed.


  3. Bruce (SqlWork.com) 74,696 Reputation points
    2022-05-19T21:40:16.427+00:00

    then most likely the build platform does not match.

    use IIS and open the site basic setting. get the physical path

    open a command window and check that the app runs

    cd to that physical path
    dir
    dotnet theappname.dll

    if it runs then check that dotnet is on path for system environment variables


  4. Eduardo Santos 0 Reputation points
    2023-10-20T17:17:38.58+00:00

    I had this same issue with configuration:

    Architecture: x64

    Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)

    Windows Server 2019 / IIS

    The Framework was installed (checked with "dotnet --info") - none of the solutions found fixed this. Then I've changed web.config based on another Blazor Server project (which worked at first time).

    Problem: Visual Studio 2022 published this file with this content:

    <aspNetCore processPath=".\MyAppHosted.Server.exe"

    Solution: The solution in my case: I've changed this for:

    <aspNetCore processPath="dotnet" arguments=".\MyAppHosted.Server.dll"


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.