In previous versions of ASP.Net, we could retrieve the description of a HTTP status code in a few ways as shown here:
Get description for HTTP status code
Is the
This is close enough for my needs:
var statusCode = httpContext.Response.StatusCode var description = ((HttpStatusCode)statusCode).ToString(); // 404 -> "NotFound"