How to handle ThreadAbortException without specifying False for Response.End
I know all about this exception, read the msdn article here http://support.microsoft.com/kb/312629/EN-US/ but I don't know how to deal with this when my boss doesn't want me to select false for Response.End.
Here's what I have:
else
{
try
{
VoidlOrder(transactionID);
}
catch (Exception ex)
{
LogError(ex.ToString());
}
finally
{
RedirectUser(sessionID,"showfmsg=1", true);
}
}
RedirectUser is just a utility method we run that ultimately passes true for the reponse.redirect resopnse.end parameter.
So what other option is there other than putting false as this parameter? He states to catch him and do something ... okay, what? I don't see any other fix than sending false to this call every time because I cannot get this exception. I get it every time.
UPDATED
tried this but i still get threadabortexception in outer catch:
else
{
try
{
VoidOrder(transactionID);
}
catch (Exception ex)
{
LogError(ex.ToString());
}
finally
{
try
{
RedirectUserBackToCheckout(sessionID, "showfmsg=1", true);
}
catch (ThreadAbortException)
{
}
}
}
}
catch (Exception ex)
{
// some other logic
}
+2
a source to share