Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Decrypting Message from MSMQ › Re: Decrypting Message from MSMQ
I know that MSMQ uses XmlFormatter by default, and it appends, <string> at the start and end of the message. That's why I am using the BodyStream property of the message and not the Body. BodyStream, writes the stream as it is, and there are no problems there, Both the File and queue message data are the same when they reach the pipeline component, I've checked that by writting to Eventlog from there. But for that same Queue message it gives Bad Data when trying to decrypt it.
The difference I spotted as I mentioned in my first post, is when I try to Get Size, of the queue message by using BodyPart.GetSize(out Size, out Implemented), it gives Size=0, and Implemented = false for the queue message and Size=336, and Implemented=true for the file message. As I said both have the same stream, so why there is a change of behaviour there.
Now this is what Biztalk documentation say about the Implemented out paramter of GetSize method:
Pointer to a Boolean used to return the information if the message size can be determined. true if the IBaseMessage object can determine the size; otherwise, false.
Why it is unable to determine it is beyond me, Hope I've explained myself better now, Any ideas?
Regards,
Sajid.