?
=?iso-8859-1?Q?Stefan_N=E4sman?=
Hi
When reading XML documents from a MSMQ Queue I get some
serialization exception and I don't know how to solve it.
Exception message:
"Cannot deserialize the message passed as an argument.
Cannot recognize the serialization format."
try
{
System.Messaging.MessageQueue mq =
(System.Messaging.MessageQueue)source;
mq.Formatter = new XmlMessageFormatter(new string
[] {"System.String"});
System.Messaging.Message m = mq.EndReceive
(asyncResult.AsyncResult);
mq.BeginReceive();
theCallBack(m.Body.ToString(),mq.QueueName);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Regards
Stefan Näsman
When reading XML documents from a MSMQ Queue I get some
serialization exception and I don't know how to solve it.
Exception message:
"Cannot deserialize the message passed as an argument.
Cannot recognize the serialization format."
try
{
System.Messaging.MessageQueue mq =
(System.Messaging.MessageQueue)source;
mq.Formatter = new XmlMessageFormatter(new string
[] {"System.String"});
System.Messaging.Message m = mq.EndReceive
(asyncResult.AsyncResult);
mq.BeginReceive();
theCallBack(m.Body.ToString(),mq.QueueName);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Regards
Stefan Näsman