Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
public void AfterReceiveReply(ref Message reply, object correlationState)
{
//Create the buffer
MessageBuffer buffer = reply.CreateBufferedCopy(13000);
//Inspect the response (for now simply extract the body contents)
Message thisReply = buffer.CreateMessage();
XmlDictionaryReader reader = thisReply.GetReaderAtBodyContents();
StringBuilder info = new StringBuilder();
XmlWriter writer = XmlWriter.Create(info);
writer.WriteNode(reader, true);
writer.Close();
reply = buffer.CreateMessage();
//Close the buffer
buffer.Close();
}
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=548528&SiteID=1