[Mono-dev] Response.Redirect possible exception when using forms authentication

Carlos Solorzano carlos at applianz.com
Fri Dec 16 04:02:58 EST 2005


On Dec 16, 2005, at 2:55 AM, Carlos Solorzano wrote:

> I am using forms authentication with XSP on mono 1.1.10.1
> Whenever a user logs in, sometimes, the login page never responds  
> after entering the username and password. I went ahead and tried to  
> figure out where its getting stuck. I am almost certain now that  
> the End() method on HttpResponse.cs can throw the exception given  
> below. Try Catching that exception makes my forms authentication  
> work correctly almost always now.
> Is there maybe something wrong I could be doing on my code? I know  
> that sometimes having Try Catch blocks on Redirects can cause  
> problems but I don't have any as far as I can tell, either-way I  
> think an error should be shown to the user if thats the case, right  
> now the code just doesn't respond.
>
> Anyways here is the exception:
>
> System.Threading.ThreadAbortException: Thread was being aborted
> in (wrapper managed-to-native)  
> System.Object:__icall_wrapper_mono_thread_interruption_checkpoint ()
> in (wrapper managed-to-native)  
> System.Threading.Thread:Abort_internal (object)
> in <0x0001a> System.Threading.Thread:Abort (System.Object stateInfo)
> in <0x00071> System.Web.HttpResponse:End ()


I changed my code to not do a RedirectFromLoginPage() but instead get  
the authentication cookie and do a Response.Redirect(url,FALSE), and  
that FALSE made it all work again. What I don't understand is what is  
keeping the thread from being aborted, is there an easy way to find  
that out? and why is no error actually showing up on the page?

--Carlos



More information about the Mono-devel-list mailing list