Microsoft recently released the Web Service Enhancements (WSE) which opens an exciting new era in the world of Web Service development. Using WS-Security classes within the WSDK you can now authenticate Web Service users using X.509 certificates or username/password, digitally sign SOAP messages, and encrypt SOAP messages. In addition to these features, the WSE allows you to route Web Service calls between different machines with WS-Routing and add SOAP attachments with DIME.
This sample application demonstrates authenticating users via username and password and encrypting SOAP messages using private key (symmetric) encryption built-into the WSE. It includes a sample web.config file with the necessary WSE entries, sample classes that implement the IPasswordProvider and IDecryptionKeyProvider interfaces, a test proxy, and other code to show you how to encrypt SOAP messages.