0

I faced the problem of display message body. I send test message (using XmlFormatter) to queue using C# (I have Windows 7).

How can I remove hex from message body preview?

enter image description here

I found interesting moment: if body less 612 bytes - xml display is ok, but if body more 612 bytes - appears hex.

enter image description here

I can't use BinaryFormatter, because I need show in the message property (body) clear xml. (If use BinaryFormatter, hex displayed too). I tried create custom (TxtFormatter) formatter - hex displayed too.

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
Alex894
  • 67
  • 7

3 Answers3

1

I found solution. Just need use ActiveXMessageFormatter

Alex894
  • 67
  • 7
1

If you are using XmlMessageFormatter() while passing a non-XML string, you should ensure the following:

  1. If message is an object, ensure that it has the attribute [Serializable]. Otherwise, the message body will be hexadecimal format.
  2. Ensure the resulting serialized object attributes map correctly and have valid values, if defined in an XSD (XML Schema Definition) file.
Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
0

Or you could use MSMQ Studio to view MSMQ messages. https://msmq-studio.com