Click to See Complete Forum and Search --> : deserializing msmq message to a struct or class


bdriscoll
May 29th, 2002, 10:52 AM
Hi,

I am using msmq to send and receive messages for a certain app. I am putting an object in the message bidy (some type of struct to pass some data along). Sending works fine, but I am having problems when attempting to read the message body. I can't seem to get the TargetTypes/TargetTypeNames properties right. I get the following error:

An unhandled exception of type 'System.TypeLoadException' occurred in system.messaging.dll

Additional information: Could not load type MakeMessage from assembly System.Messaging

Any thoughts/ideas on how this is done?

tykester
May 30th, 2002, 09:18 PM
I believe that your object must support (derive from) the IPersistStream interface. The queue must persist the object to a message stream and then reinstantiate when the invocation actually occurs.

Dezaad
May 23rd, 2004, 09:42 PM
The name of the type must be fully qualified. A similar case might involve the 'String' type. When you designate String as a type, however, you'd have to use "System.String".