none
WCF Digital signature RRS feed

  • Question

  • hello everybody,

    I am facing problem how to add digital signature and binary token in wcf while sending the request from client. in terms of x509 certificate.

    i have the private key with me and public key given to server and calculated the digest value and calculate the signature value using signedxml but here i am struck how to add these things in wcf while sending the soap request from client.

    please respond this ; it's urgent.

    or any other way to do this ?

    Wednesday, April 9, 2014 9:49 AM

Answers

  • Hi,

    A message contract can indicate whether the headers and/or body of the message should be digitally signed and encrypted.

    This is done by setting the System.ServiceModel.MessageContractMemberAttribute.ProtectionLevel property on the MessageHeaderAttribute and MessageBodyMemberAttribute attributes. The property is an enumeration of the System.Net.Security.ProtectionLevel type and can be set to None (no encryption or signature), Sign (digital signature only), or EncryptAndSign (both encryption and a digital signature). The default is EncryptAndSign.

    For these security features to work, you must properly configure the binding and behaviors. If you use these security features without the proper configuration (for example, attempting to sign a message without supplying your credentials), an exception is thrown at validation time.

    For message headers, the protection level is determined individually for each header.

    For message body parts, the protection level can be thought of as the "minimum protection level." The body has only one protection level, regardless of the number of body parts. The protection level of the body is determined by the highest ProtectionLevel property setting of all the body parts. However, you should set the protection level of each body part to the actual minimum protection level required.  Please see this article for more detailed examples.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 14, 2014 4:47 AM
    Moderator