I faced following error when I deployed .Net Core Web Application to my local IIS server.
HTTP Error 500.30–ANCM In-Process Start Failure
It doest not provide a direct cause and can be very frustrating when trying to get that app ready for production.
While searching for this, I found a number of common causes for this error:
- The application failed to start
- The application started but then stopped
- The application started but threw an exception during startup
These are some options you can try to find out the root cause for this issue.
-
Attach a debugger to the application process.
-
Check the event log for error messages from Event Viewer. Go to
Event Viewer
>Windows Logs
>Application
. You will found anError
withSource
column's value asIIS AspNetCore Module
,IIS Express AspNetCore Module
,IIS AspNetCore Module V2
orIIS Express AspNetCore Module V2
. -
Enable logging the application through stdout messages. Go to project's root folder, open
web.config
file. You will find theaspNetCore
tag:<aspNetCore processPath="dotnet" arguments=".\MyApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
Set
stdoutLogEnabled
value totrue
, and put logs folder path instdoutLogFile
. Ensure that your application pool’s identity account has write permissions to the logs folder. After you make a request to the application, look in the logs folder and check the latest log file for errors.Once you find the root cause of the problem, make sure to reset
stdoutLogEnabled
tofalse
in theweb.config
file to turn off logging. -
Open the command prompt and navigate to the application's root folder, and execute the application's assembly with
dotnet
.dotnet .\<assembly_name>.dll
Substitute <assembly_name> with the name of the application.
If there is any error that occurred at the startup of the application, it will be written in the console output.
Also try making a request to the web app by navigating to the url in browser. If there is any error in processing the request, it will be displayed on console output. If there are no errors, the problem is might be related to the hosting configuration and not the application.