I want to simulate this error so I can check a generic error page is displayed, not the HTTP 500 one, in light of the recent security vulnerability.
We include speci
I think you can do this by overriding page init and adding the 500 status code to the response like the following:
protected void Page_Init(object sender, EventArgs e) { Response.Clear(); Response.StatusCode = 500; Response.End(); }
Enjoy!