ASP NET Core - How to fix an error occurred while starting the application?



Exciting new technologies come with exciting new ways to frustrate developers :D

Working with ASP NET Core you may have come across this message a few times and wondered what the heck is the problem?

There is a web.config file with a STDOut logging variable on it but that does not log until the application starts. So that is no help.

You look in the even viewer and you none the wiser, as the error is just as vague as this page you have seen.

The solutions is to actually add some extra settings on the BuildWebHost builder in Startup.cs



GIST

Re-deploy the application and you will get actual reasons as to why the application just wont start. For example:



Obviously all of this information is provided in the official documentation - But who reads that? :D

Comments