'System.Threading.ThreadAbortException' on an ASP.net page

I have the code below on my ASP.net page:

Response.StatusCode = 404
Response.Write(strResult)
Response.End()

In the above code, an “System.Threading.ThreadAbortException” exception has occurred and has been detected. "

Can someone tell me the reason? And I solve it.

thank

+3
source share
1 answer

A call Response.End()from any page child is likely to throw a System.Threading.ThreadAbortException.

Please read this for a full explanation of why this happens and methods to prevent / eliminate the exception.

+1
source

All Articles