\" again, i\'m get" />
开发者

Read WCF Message body twice - "Message Cannot be read"

开发者 https://www.devze.com 2022-12-18 15:56 出处:网络
I have a WCF Message (Channels.Message) which i\'m trying to extract the body using .GetBody(). however, i notice that i can do it only once, and if i\'m trying to use \"GetBody<>\" again, i\'m get

I have a WCF Message (Channels.Message) which i'm trying to extract the body using .GetBody(). however, i notice that i can do it only once, and if i'm trying to use "GetBody<>" again, i'm getting :"This message cannot support the operation because it has been read."

开发者_运维百科

Any idea how can i re-read the message body?

thanks


Here is a pretty good article about what you are trying to do on MSDN. Please see the section titled Copying a Message into a Buffer. It explicitly talks about having to access the message body more than once.

http://msdn.microsoft.com/en-us/library/ms734675.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号