views:

191

answers:

0

Hi dear stackoverflow visitors:)

I have another question about wcf. Here is my scenario:

  • I am using wsHttpBinding, security mode TransportWithMessageCredential

  • On my wcf service, I intercept the outgoing message with dispatch message inspector, before the SOAP message is sent to my client.

  • Using 3rd party APIs I digitally sign the SOAP message body.
  • And then send to my clients. But during the validation of this digital signature at client side an exception is thrown indicating invalid signature.
  • Detailed examination of the SOAP message showed me that I have a problem with the timestamp tags inside the security header. There are two 'SignedInfo' tags created inside the Security tag of the envelope, one for timestamps and one for the digitally signed body part.

Brief problem is when I intercept the message the Security section is created with SignedInfo while digital signing, and then just before sending the message WCF adds the timestamps (Created / Expires) and Signs them again creating a second SignInfo tag.

My question is is there any way to intercept the message after timestamp tags are created inside the header? If I can do that, I believe I can group the two 'SignedInfo' tags in one.

Thank you for your time.

Regards,