does MessageBuffer.CreateMessage really create identical copy of the original Message? RRS feed

  • Question

  • I have a weird problem here. I have one wcf webserivce with multiple custom service and endpoint behaviors. Two of them are conflicting with each other. One behavior creates a copy of the incoming message and stores it into database. The other behavior grabs the SAML assertion statements from the head and verifies against the x509 certificate. They both work fine individually. But if I enable them both, the second behavior will fail because it fails certificate verification. looks like the first one is triggered before the second one and somehow alters the message. but the code I use to create the copy of the message is just MessageBuffer buffer = request.CreateBufferedCopy(Int32.MaxValue); request = buffer.CreateMessage(); According the MSDN, this should create an identical copy of the original Message.

    Does anyone have any idea what's going on here? How can i make my second behavior work?

    Regards Victor


    Monday, February 25, 2013 9:34 PM