Thread was being aborted

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am using FormsAuthentication. I am logging In through a Authentication
cookie and signing out through a button.

On click of that button i am writing

FormsAuthentication.SignOut();
Response.Redirect("Login.aspx");

At Response.Redirect("Login.aspx"); this line it is giving
'Thread was being aborted' exception

Does any one know how to solve the problem

Thanks
 
that's the default expected behavior of Response.Rediret (and
Server.Transfer), so don't worry about that.
 
Reshma,

This is a known problem. For a workaround you can use an overload to
Response.Redirect that will pass false to the endresponse parameter to
suppress the internal call to Response.End (e.g.
Response.Redirect("Login.aspx", false);). I have posted the link to this in
the MSDN below.

Hope this helps.
 
tehehe, that is a very good one. PRB and writers really need to be in sync.
I agree.

--
Regards,
Alvin Bruney

Shameless Author plug
The Microsoft Office Web Components Black Book with .NET
http://tinyurl.com/27cok
 
Back
Top