Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error 500.30 - ASP.NET Core 5 app failed to start

I deploy a .NET Core 5 app with settings: enter image description here

And the website shows an error:

HTTP Error 500.30 - ASP.NET Core app failed to start Common solutions to this issue:

  • The app failed to start
  • The app started but then stopped
  • The app started but threw an exception during startup

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=2028265

What is causing this error?

like image 272
Paolo Constantin Avatar asked Apr 22 '21 10:04

Paolo Constantin


People also ask

How to resolve HTTP error 500. 30 ASP.NET Core app failed to start?

Check if the proper version of the ASP.NET Core Hosting Bundle is installed on the target machine (and install it if it's missing). Azure Key Vault lack of permissions. If you're using the Azure Key Vault, check the access policies in the targeted Key Vault to ensure that the correct permissions are granted.

How to fix HTTP error 500. 30 ancm in process start failure?

How to Fix HTTP error 500.30 – ancm in-process start failure. The easiest way to fix this error is to re-publish your code, but make sure you tick options “Remove additional files at destination“.

What is shared framework?

The shared framework is the set of assemblies (. dll files) that are installed on the machine and includes a runtime component and a targeting pack.

What is ASP.NET Core web application?

ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled, Internet-connected apps. With ASP.NET Core, you can: Build web apps and services, Internet of Things (IoT) apps, and mobile backends. Use your favorite development tools on Windows, macOS, and Linux.


Video Answer


4 Answers

There may be a few reasons behind the error which you can only identify by debugging. You can try to debug this error using the steps below:

  1. Navigate to the root directory of the application using CMD
  2. Run the application using the command dotnet run (yourApplicationName).dll

If there are any errors, they should appear in the output.

Alternatively, you can check "Event Viewer" (search Event Viewer using Windows search) and navigate to

  • Windows Logs
    • Application

Update:

dotnet (yourApplicationName).dll

and check http://localhost:5000/ for error

like image 163
uvylight Avatar answered Oct 19 '22 17:10

uvylight


enter image description here

Go there, and try to manually start your project... i.e.

dotnet ServerApp.dll

enter image description here

like image 33
130nk3r5 Avatar answered Oct 19 '22 18:10

130nk3r5


open Windows Event Viewer, find the error message and click it, open the Detail tab, you will see the exception.

like image 9
Harrison Wu Avatar answered Oct 19 '22 19:10

Harrison Wu


I recently encountered this issue deploying my .net core 5 app to IIS. I am using environment variables for my various envrionments and the web.config that was deployed was missing the xml tags.

Changing this line:

<aspNetCore processPath="dotnet" arguments=".\<your>.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess"/>

to:

<aspNetCore processPath="dotnet" arguments=".\<your>.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
   <environmentVariables>
        <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Local" />
   </environmentVariables>
</aspNetCore>

This fixed my 500.30 issue.

I took guidance from @Mohammed https://stackoverflow.com/a/59390437/6155498

like image 8
PaulGrant Avatar answered Oct 19 '22 18:10

PaulGrant