title: ASP.NET core running in IIS startup error logging
body: <p>How do you capture startup errors in an ASP.NET Core app hosted in IIS? I'm trying to capture exceptions thrown in <code>ConfigureServices</code> which occurs only in the IIS hosted environment. </p>
  
  <p>I came across this as a certificate file loaded in <code>ConfigureServices</code> was missing and it was not captured without writing to a different log file than the application log file configured through log configuration (note that the logging system doesn't get initialised before <code>ConfigureServices</code>). In this case <code>stderr</code> would contain the exception but does IIS capture it and log it somewhere?</p>