If you've stumbled upon this post, it most likely means that you've just published a new ASP.NET Core Web Application on a Windows web server using Internet Information Services (IIS) and you've got the following HTTP error 500.30 when trying to execute it:
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 startupTroubleshooting steps:
- Check the system event log for error messages
- Enable logging the application process' stdout messages
- Attach a debugger to the application process and inspectFor more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
If we follow the Microsoft link we can see how such error happens when the worker process fails: the ASP.NET Core Module attempts to start the .NET Core CLR in-process, but it fails to start, thus preventing the app from running.
Unfortunately, the cause of a process startup failure might be due to a number of different reasons: the Microsoft guide suggest to look in the Application Event Log and/or in the ASP.NET Core Module stdout log, which will likely report some useful information regarding the problem. However, the most common failure conditions are:
- ASP.NET Core framework (or Hosting Bundle) is not present. 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.
Furthermore, there's an additional common cause of HTTP Error 500.30 which is not covered by the Microsoft guide: the wrong CPU architecture configured in the IIS Application Pool. Such error happens when you deploy a win-x64 app and try to have it published using a IIS Application Pool that supports 32-bit apps (and vice-versa). To fix that, you just have to change the IIS Application Pool configuration from the IIS Manager tool in the following way:
In the above example, we're changing the IIS Application Pool from 32-bit to 64-bit, which is required if we need to publish a win-64 app.
Conclusion
That's it, at least for now: we hope that this informative post can help other ASP.NET Core Developers and System Administrators stuck with the HTTP Error 500.30 when trying to deploy their ASP.NET Core Web Application on a Windows-IIS web server. This solution has also been shared in the following StackOverflow thread.