I am experiencing runtime errors since upgrading to the .NET 2.0 frame work. I am getting errors trying to instantiate remote objects. I get the error:
"The input stream is not a valid binary format. The starting contents (in bytes) are: 53-79-73-74-65-6D-2E-42-61-64-49-6D-61-67-65-46-6F ..."
From what I can gather, this happens when IIS sends back an error message as plain text that the binary formatter doesn't know how to handle.
Looking at the logs generated from nHibernate (our OR mapping tool) I also noticed the following error:
14/11/2006 9:16:09 AM - An exception of type (SerializationException) occurred in (mscorlib)System.Runtime.Serialization.SerializationException: Type 'Nullables.NullableBoolean' in Assembly 'Nullables, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Tracing through the code it appears to through the exception on the highlighted line below. (which does have an attribute of 'Serializable'. This code also works in our v1.1 framework. Any ideas?
[System.ComponentModel.
TypeConverter(typeof(Nullables.TypeConverters.NullableBooleanConverter)), Serializable()]
public struct NullableBoolean : INullableType, IComparable
{
public static readonly NullableBoolean Default = new NullableBoolean();