Fixing 1st WIF Training Kit Lab

I’m just going through the labs of the Windows Identity Foundation Training Kit and already the first lab (Web Sites and Identity) fails after adding a test STS to the Web application with a System.Threading.ThreadAbortException in the Default.aspx.cs in Page_PreRender. After a little research I found a blog post by Ben Morris who describes this exception as a ‘feature’ thrown when the Web application redirects to the STS. After adding an empty catch (just before the general catch in Page_PreRender) like this

catch(ThreadAbortException) { }

things worked like a charm.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s