Microsoft announces Silverlight

Microsoft have just announced Silverlight, the new branding for what was previously known as WPF/E. They've also provided a lot more details about the specifications and their future plans. 

Silverlight is the new Adobe (Macromedia) Flash competitor from Microsoft, it is based on the new Windows Presentation Foundation graphics engine found in Vista. It turns out that it will be very tightly integrated with .Net even to the point of shipping with its own cut down runtime.

The download should be around 2MB though initially it will not contain 3D capabilities. IE, Firefox and Safari will be supported at launch.

Silverlight website: http://www.microsoft.com/silverlight/

Response.Redirect and the ThreadAbortException

A colleague came across a problem recently where performance counters were showing a high exception to request ratio. In actual fact there were at 4 exceptions for every 1 request, that's 400% compared to the desired 5%. These seemed to be getting handled at some stage or another as there were no HttpUnhandledExceptions getting thrown at the UI.

It turns out that Response.Redirect and Server.Transfer will throw a ThreadAbortException everytime the single parameter overload is called.

i.e. Response.Redirect( string url )

The problem is that Response.Redirect will call a Response.End internally to stop code executing after the statement. This in turn throws our mystery exceptions. To work around this use the overloaded version which allows code after the statement to be executed and try not to treat the statement as the end of a code block.

i.e. pass "false" to second param of

Response.Redirect( string url, bool endResponse )

There is a lot of fair argument to say that this shouldn't cause an exception. So if you see unexplained high exception counters, have a look at your Response.Redirects and Server.Transfers.

MSDN Article: PRB: ThreadAbortException Occurs If You Use Response.End, Response.Redirect, or Server.Transfer

P.S. Thanks to Josh Twist at MS for pointing this one out. ;)