In old ASP.NET I could tell why my app stopped by looking at HostingEnvironment.ShutdownReason
.
In ASP.NET Core, this doesn't exist. Where can I get this info?
There is no shutdown reason in ASP.NET Core. The good news is, the application dies for a lot less reasons now than it did before because of the new hosting model.
To put things in perspective, of the events listed on https://learn.microsoft.com/en-us/dotnet/api/system.web.applicationshutdownreason?view=netframework-4.8.1, the ones that are applicable in ASP.NET Core are:
If we added this, maybe new custom one: