在Visual Studio 2019中使用IIS Express运行站点运行站点报错:HTTP Error 500.30 - ANCM In-Process Start Failure

Common solutions to this issue:
The application failed to start
The application started but then stopped
The application 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

图片如下:

error page

解决办法:在Visual Studio中检查你是否忽略了启动项目这个配置?直接在资源管理器中右键我们的Web项目,然后选择“设为启动项目”。然后在Visual Studio菜单上运行IIS Express。一切都正常!