J
Jan
Hi,
If I put a try catch block for Server.Transfer call. It will catch a
System.Threading.ThreadAbortException exception like this. However, it
transfer the page to the correct page. Why did this exception occur?
Thanks.
------------------------------------
{"Thread was being aborted." }
[System.Threading.ThreadAbortException]:
{System.Threading.ThreadAbortException}
System.Object: {System.Threading.ThreadAbortException}
_COMPlusExceptionCode: -532459699
_className: "System.Threading.ThreadAbortException"
_exceptionMethod: {System.Reflection.RuntimeMethodInfo}
_exceptionMethodString: null
_message: "Thread was being aborted."
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: " at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at TestASPNET.Form1.btnTransfer_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\testaspnet\form1.aspx.cs:line 182"
_remoteStackTraceString: null
_remoteStackIndex: 0
_HResult: -2146233040
_source: "mscorlib"
_xptrs: 0
_xcode: -532459699
Message: "Thread was being aborted."
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at TestASPNET.Form1.btnTransfer_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\testaspnet\form1.aspx.cs:line 182"
HelpLink: ""
Source: "mscorlib"
HResult: -2146233040
If I put a try catch block for Server.Transfer call. It will catch a
System.Threading.ThreadAbortException exception like this. However, it
transfer the page to the correct page. Why did this exception occur?
Thanks.
------------------------------------
{"Thread was being aborted." }
[System.Threading.ThreadAbortException]:
{System.Threading.ThreadAbortException}
System.Object: {System.Threading.ThreadAbortException}
_COMPlusExceptionCode: -532459699
_className: "System.Threading.ThreadAbortException"
_exceptionMethod: {System.Reflection.RuntimeMethodInfo}
_exceptionMethodString: null
_message: "Thread was being aborted."
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: " at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at TestASPNET.Form1.btnTransfer_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\testaspnet\form1.aspx.cs:line 182"
_remoteStackTraceString: null
_remoteStackIndex: 0
_HResult: -2146233040
_source: "mscorlib"
_xptrs: 0
_xcode: -532459699
Message: "Thread was being aborted."
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at TestASPNET.Form1.btnTransfer_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\testaspnet\form1.aspx.cs:line 182"
HelpLink: ""
Source: "mscorlib"
HResult: -2146233040