1
Reply

msmq programming in c#

orion

orion

May 16 2004 12:21 PM
2.7k
When the message body is string, I can dequeue the message. But when I change the message body to a data structure, say, public struct Customer { public string Last; public string First; } I encounter the following error stack trace at System.Type.GetType(String typeName, Boolean throwOnError) at System.Messaging.XmlMessageFormatter.CreateTargetSerializerTable() at System.Messaging.XmlMessageFormatter.Read(Message message) at System.Messaging.Message.get_Body() I have correctly set the message's formatter to be new XmlMessageFormatter(new String[] {"Customer", "customer"}) where "customer" is the name of assembly containing the Customer struct. The message is taken from the queue. This error appears when I try to either typecast message's body or directly printout its body.toString(). Has anyone encountered this error b4? Any idea? Many thanks

Answers (1)