How to send a Status Code 500 in ASP.Net and still write to the response? March 2, 2023 by Tarik Context.Response.TrySkipIisCustomErrors = true