No map for object

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hello all,
I have some code:

Public Shared Function DeserializeMessage(ByVal stream As Byte(), ByRef obj
As Object) As Boolean

Try
Dim ms As MemoryStream = New MemoryStream(stream)
Dim bf As BinaryFormatter = New BinaryFormatter
ms.Position = 0
bf.Binder = New MessageBinder
bf.Binder.BindToType([Assembly].GetExecutingAssembly().FullName,
"AlertMessage")
obj = bf.Deserialize(ms)
Return True
Catch exp As System.Runtime.Serialization.SerializationException
Debug.WriteLine(String.Format("Exception in DeserializeMessage, {0}",
exp.ToString))
Return False
End Try
End Function

When I attempt to deserialize (obj = bf.Deserialize(ms), I receive the
No map for object 201326592
error. How can I determine what object this is? I suspect it is the
AlertMessage, which is a class of my own design. What can I do to resolve
this error?

Thanks,
Steven
 
Back
Top