Hi,
I have do some Redirects in my applitcaion.
For example, when the use rhas logged in successfully I
redirect them to a different page.
In my Redirect all I was doing was a..
Response.Redire ct("SomePage.as px")
When I used above I got below error.
2) Exception Information
*************** *************** ***************
Exception Type: System.Threadin g.ThreadAbortEx ception
ExceptionState:
System.Web.Http Application+Can celModuleExcept ion
Message: Thread was being aborted.
TargetSite: Void AbortInternal()
HelpLink: NULL
Source: mscorlib
StackTrace Information
*************** *************** ***************
at System.Threadin g.Thread.AbortI nternal()
at System.Threadin g.Thread.Abort( Object stateInfo)
at System.Web.Http Response.End()
at System.Web.Http Response.Redire ct(String url, Boolean
endResponse)
at System.Web.Http Response.Redire ct(String url)
I have now changed all my Redirects to be..
Response.Redire ct("MyPage.aspx ", False)
I use False everywhere as I don't want to ever end the
execution of my page.
I have 2 questions-:
(i) Why was I getting above error. Do I have to pass in a
boolean also to my Response.Redire ct?
(ii) When would I use True. Surely I will never want to
finish executing the page I am on so it will always be
False???
Any advice on this is much appreciated.
I have do some Redirects in my applitcaion.
For example, when the use rhas logged in successfully I
redirect them to a different page.
In my Redirect all I was doing was a..
Response.Redire ct("SomePage.as px")
When I used above I got below error.
2) Exception Information
*************** *************** ***************
Exception Type: System.Threadin g.ThreadAbortEx ception
ExceptionState:
System.Web.Http Application+Can celModuleExcept ion
Message: Thread was being aborted.
TargetSite: Void AbortInternal()
HelpLink: NULL
Source: mscorlib
StackTrace Information
*************** *************** ***************
at System.Threadin g.Thread.AbortI nternal()
at System.Threadin g.Thread.Abort( Object stateInfo)
at System.Web.Http Response.End()
at System.Web.Http Response.Redire ct(String url, Boolean
endResponse)
at System.Web.Http Response.Redire ct(String url)
I have now changed all my Redirects to be..
Response.Redire ct("MyPage.aspx ", False)
I use False everywhere as I don't want to ever end the
execution of my page.
I have 2 questions-:
(i) Why was I getting above error. Do I have to pass in a
boolean also to my Response.Redire ct?
(ii) When would I use True. Surely I will never want to
finish executing the page I am on so it will always be
False???
Any advice on this is much appreciated.
Comment