ASP.NET sees the session cookie and loads the session (or doesn't, and starts a new one). This is why people recommend serving static, unauthenticated resources like images from a separate domain.
There really isn't such a thing as an "unhandled error" -- if your code throws an error outside of a Try...Catch block, then your error bubbles up through various ASP ...
Take advantage of the open source ProblemDetails middleware in ASP.NET Core to send clients standardized, machine-readable error messages when exceptions occur For an ...
ASP.NET MVC is driven by the URLs your users provide to get to the Views they want to see. If those URLs don't include a controller or action method name, then you can provide the missing information ...