February 23, 2020

HTTP Error 500.30–ANCM In-Process Start Failure

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.

  1. Attach a debugger to the application process.

  2. Check the event log for error messages from Event Viewer. Go to Event Viewer > Windows Logs > Application. You will found an Error with Source column's value as IIS AspNetCore Module, IIS Express AspNetCore Module, IIS AspNetCore Module V2 or IIS Express AspNetCore Module V2.

  3. Enable logging the application through stdout messages. Go to project's root folder, open web.config file. You will find the aspNetCore tag:

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

    Set stdoutLogEnabled value to true, and put logs folder path in stdoutLogFile. 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 to false in the web.config file to turn off logging.

  4. 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.

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete