How to get html response from middleware UseDeveloperExceptionPage in statup (asp.net core)

276 Views Asked by At

How to read HTML response from well-formatted HTML response by built-in and generated from UseDeveloperExceptionPage in startup class when a generic exception is thrown. so that I can send the same exception as email body just like Elmah logging sends exception via email.

Please follow the code below:

Code

1

There are 1 best solutions below

0
Rahul Uttarkar On

https://github.com/aspnet/Diagnostics/tree/master/src/Microsoft.AspNetCore.Diagnostics/DeveloperExceptionPage

Only way is to re-do the html construction using a reference from original source code.