I have downloaded and deployed an example of MSMQ client and service, from an MSDN blog.
It works quite well (after I fixed some namespaces). But when I open the Message Queuing tool (built in Windows) and try to examine the message body, it looks quite strange:
00 01 00 01 04 02 24 6E ......$n
65 74 2E 6D 73 6D 71 3A et.msmq:
2F 2F 6C 6F 63 61 6C 68 //localh
6F 73 74 2F 70 72 69 76 ost/priv
61 74 65 2F 6D 79 51 75 ate/myQu
65 75 65 03 07 56 02 0B eue..V..
01 73 04 0B 01 61 06 56 .s...a.V
08 44 0A 1E 00 82 99 39 .D...9
75 72 6E 3A 5A 69 6D 6D urn:Zimm
73 2F 53 61 6D 70 6C 65 s/Sample
73 2F 6E 65 74 4D 73 6D s/netMsm
71 2F 49 53 65 72 76 69 q/IServi
63 65 50 72 6F 63 65 73 ceProces
73 6F 72 2F 53 75 62 6D sor/Subm
69 74 4D 65 73 73 61 67 itMessag
65 40 17 56 73 44 65 62 [email protected]
75 67 67 65 72 43 61 75 uggerCau
73 61 6C 69 74 79 44 61 salityDa
74 61 08 41 68 74 74 70 ta.Ahttp
3A 2F 2F 73 63 68 65 6D ://schem
61 73 2E 6D 69 63 72 6F as.micro
73 6F 66 74 2E 63 6F 6D soft.com
2F 76 73 74 75 64 69 6F /vstudio
2F 64 69 61 67 6E 6F 73 /diagnos
74 69 63 73 2F 73 65 72 tics/ser
76 69 63 65 6D 6F 64 65 vicemode
6C 73 69 6E 6B 9F 3C B8 lsink<¸
80 CF A3 B1 65 61 39 AF Ï£±ea9¯
8E 52 4C B3 BF 2F 72 1F RL³¿/r.
E3 7D 05 00 00 00 00 07 ã}......
01 F3 09 0E 56 2E 41 9E .ó..V.A
63 BA 18 56 DE 5D D7 10 cº.VÞ]×.
53 92 73 3C 3C 77 45 B5 Ss<
B6 85 24 2B 02 E1 0E 00 ¶$+.á..
09 00 00 44 0C 1E 00 82 ...D...
99 24 6E 65 74 2E 6D 73 $net.ms
6D 71 3A 2F 2F 6C 6F 63 mq://loc
61 6C 68 6F 73 74 2F 70 alhost/p
72 69 76 61 74 65 2F 6D rivate/m
79 51 75 65 75 65 01 56 yQueue.V
0E 40 0D 53 75 62 6D 69 [email protected]
74 4D 65 73 73 61 67 65 tMessage
08 19 75 72 6E 3A 5A 69 ..urn:Zi
6D 6D 73 2F 53 61 6D 70 mms/Samp
6C 65 73 2F 6E 65 74 4D les/netM
73 6D 71 40 07 72 65 71 [email protected]
75 65 73 74 99 24 38 36 uest$86
61 63 36 61 39 32 2D 64 ac6a92-d
37 36 34 2D 34 35 62 37 764-45b7
2D 39 36 38 34 2D 37 65 -9684-7e
64 39 65 36 30 30 35 65 d9e6005e
33 66 01 01 01 3f...
Is it because the message is encrypted? How to disable the encryption so I can clearly see the message?
I am using Windows 7 and MSMQ 4.0
UPDATE
This blog article has an example of unencrypted readable message in MSMQ: http://ardalis.com/how-can-i-view-msmq-messages-and-queues
This is what I'd like to achieve.
Queue Explorer has solved the problem:
http://www.cogin.com/msmq/QueueExplorer/QueueExplorer2.2.php
Solution was suggested at