I recently purchased a 5$ Web Hosting Plan on interserver.net. Today I tried to publish my ASP.NET Core MVC application on the server using the Plesk interface. Then when I try to access my website, I get this error:
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found
I have already run the command dotnet --info
command and it shows .NET Core SDK 3.1 is installed:
Do you have any ideas about how to solve this issue?
This is what I get in the Stdout Log:
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.0.2' was not found.
- The following frameworks were found:
2.1.13 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
2.1.17 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
2.2.7 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
2.2.8 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
3.0.0 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
3.1.1 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
3.1.3 at [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
So apparently I have to migrate my application to the .NET Core version indicated above?
2
Answers
Today I solved this issue with a self-contained publishment.
For more info: https://learn.microsoft.com/en-GB/dotnet/core/deploying/#publish-self-contained
Please check the event viewer for more information about the issue. I had the same error and event viewer showed the following error message :
Could not find ‘aspnetcorev2_inprocess.dll’. Exception message:
Could not execute because the specified command or file was not found.
All the necessary dlls were already installed but i realized that i had recently dowloaded a new version of aspnet core dll. But somehow my application pool was not able to recognize it. So i recreated the Application Pool and it solved the issue for me.