Identify ASP.Net Core startup errors

Maybe you know this great and informative error message "An error occurred while starting the application." from core when the there was an exception during the startup.

To identify and understand what happened, you must extend the Main method with the following things:

  • UseSetting("detailedErrors", "true")
  • CaptureStartupErrors(true)

After this is done, you will see a nice and detailed error page like this:

In my case the startup error was a missing json file which the application tried to load on startup.

Posted Nov 30 2016, 04:31 PM by Holger Vetter
Filed under: ,


Jim wrote re: Identify ASP.Net Core startup errors
on 01-24-2017 23:18

Oh man.  Thank you for posting this.  Saved my bacon.

Add a Comment

Remember Me? is a .Net Community Blog powered by daenet GmbH.