I\'m writing messages to a Message Queue in C# as follows:
queue.Send(new Message(\"message\"));
I\'m trying to read the messages as follow
Message recoverableMessage = new Message();
recoverableMessage.Body = "Sample Recoverable Message";
recoverableMessage.Formatter = new XmlMessageFormatter(new String[] {"System.String,mscorlib" });
MessageQueue myQueue = new MessageQueue(@".\private$\teste");
Queue must be set Formatter too.
myQueue.Formatter = new XmlMessageFormatter(new String[] { "System.String,mscorlib" });