I'm writing messages to a Message Queue in C# as follows:
(我将消息写入C#中的消息队列,如下所示:)
queue.Send(new Message("message"));
I'm trying to read the messages as follows:
(我正在尝试阅读以下消息:)
Messages messages = queue.GetAllMessages();
foreach(Message m in messages)
{
String message = m.Body;
//do something with string
}
However I'm getting an error message which says: "Cannot find a formatter capable of reading this message."
(但是,我收到一条错误消息,内容为:“找不到能够读取此消息的格式化程序。”)
What am I doing wrong?
(我究竟做错了什么?)
ask by macleojw translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…