No map for object

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top