Circumventing the KB957543 .NET 3.5 SP1 Regression Bug

2009-01-29
1 min read

A couple of days ago I hit a regression bug in .NET 3.5 SP1, in which when you have a generic class that implements ISerializable and has static variables – you can not serialize it using a BinaryFormatter without your application either hanging (x86) or raising an exception (x64 – a TargetInvocationException containing an OutOfMemoryException). This only happens if you use a reference type as a generic argument….

You can read the copy of the original post, or if that goes down too, you can try the Wayback Machine’s copy of it.

Context: This post was automatically imported from my old blog, which was originally hosted on Microsoft’s ASP.NET Community Blogs. When they shut it down, I dumped all of my old posts to Wordpress. You can still check out the original blog on the Wayback Machine.