While preparing an app to run on my local IIS server for the first time I received this error. It provides some clues as to what is happening but does not give a direct cause and can be very frustrating when trying to get that app ready for production.
HTTP Error 500.30 - ANCM In-Process Start Failure
Common causes of this issue:
- The application failed to start
- The application started but then stopped
- The application started but threw an exception during startup
- Check the system event log for error messages
- Enable logging the application process' stdout messages
- Attach a debugger to the application process and inspect
The page that we receive here basically takes us to the standard installation for the ASP.NET Core Module, which may be a good place to start to see if there was a misconfiguration when the module was installed.
Now if the issue continues there are some ways to determine what the issue is
Check Application Event Log
Access the Application Event Log:
- Open the Start menu, search for Event Viewer, and then select the Event Viewer app.
- In Event Viewer, open the Windows Logs node.
- Select Application to open the Application Event Log.
- Search for errors associated with the failing app. Errors have a value of IIS AspNetCore Module or IIS Express AspNetCore Module in the Source column.
Run the app at a command prompt
Many start-up errors don’t produce much useful information in the Application Event Log. Another option is to run the app at a command prompt on the hosting system if there is access to do that.
If the app is deployed as framework-dependent:
- At a command prompt or PowerShell window, navigate to the folder that contains the app and launch the app by executing the assembly with dotnet.exe.
- dotnet .\<assembly_name>.dll – substitute <assembly_name> with the name of the application
- In the console window, if there are any errors they will written in the output.
- If the errors only occur when making a request to the app, launch a browser and make a request to the app. Usually this will be at http://localhost:5000/. If the app responds normally with no error, the problem more likely related to the hosting configuration and not the app.
If the app is deployed as self-contained then follow the above steps substituting <assembly_name>.exe for dotnet .\<assembly_name>.dll and follow the rest of the steps.
ASP.NET Core Module stdout log
To enable and view stdout logs:
- Navigate to the app folder on the host system.
- If the logs folder isn’t present create the folder.
- Edit the web.config file. Set stdoutLogEnabled to true and change the stdoutLogFile path to point to the logs folder (for example: .\logs\stdout) stdout in the path is the log file name prefix.
- Ensure your application pool’s identity has write permissions to the logs folder.
- Save the updated web.config file.
- Make a request to the app or site.
- Look in the logs folder and find the latest log file.
- Check the file for errors.
Once trouble shooting is complete make sure to turn off logging in the web.config file by setting stdoutLogEnabled to false
Hopefully this helps solve your issue.