TechBubbles Microsoft Technology BLOG

Digital Signing the SOAP Message

WSE allows you to digitally sign a SOAP Messages by overriding the SecureMessage method.

To sign a SOAP message

1. The following code example overrides the SecureMessage method.

public override void SecureMessage(SoapEnvelope envelope, Security security)

//Obtain the security token with which you want to sign the SOAP message with.

KerberosToken kerbToken = new 
KerberosToken("host/" + hostname + "@" + domainName);
// Add the security token.                
// Specify the security token to sign the message with.
MessageSignature sig = new MessageSignature(kerbToken);
// Add the digital signature to the SOAP message.


About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.


  • […] Securing the Web Services: It is difficult to secure a web service that cross the security domains. We can secure a web service by sending over secure transport, such as Secure Socket Layer(SSL) but that holds good when the communication is point-to-point. Some times SOAP message has to be routed to so many intermediaries before reaching the receiver. We can address this problem by Adding Security Credentials to SOAP Message.Alternatively we can digitalsign a SOAP Message using WSE. […]

TechBubbles Microsoft Technology BLOG

Follow me


Tag Cloud