Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies #4721

Closed
overstartup opened this issue Nov 3, 2019 · 3 comments
Closed

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies #4721

overstartup opened this issue Nov 3, 2019 · 3 comments

Comments

@overstartup
Copy link

after i publish the project, i got this Error:

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
i don't know why it has an error. it runs correctly in local but in a server, it gives me Error.

@ampadashi
Copy link

ampadashi commented Nov 3, 2019

Would u please provide an screen shot of that error? and let me know which version of .NET core is already installed in your machine and which version of OC are you using?

@deanmarcussen
Copy link
Member

I suspect you need to publish as a self contained app.

I imagine you're publishing to Azure? Which does not yet (AFAIK) have the dotnet core 3 runtime, so you need to publish with the runtime.

If you are doing this from visual studio, you select publish as self contained

@ampadashi
Copy link

ampadashi commented Nov 3, 2019

@overstartup If you've published your app as self-contained, There's file named Web.Config. If you're using .Net Core 2.2, few lines of web.config file are like photo below:
image
In this case remove V2 from modules="AspNetCoreModuleV2" and save the config file, then restart you app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants