Custom SOAP Header

Topics: Cryptography Application Block, Security Application Block
Jun 13, 2007 at 4:09 AM
We use custom SOAP headers in our Web services to authenticate our users. Does Security Application Block offer that kind of functionalities? Is there any sample program? Is it true that .NET Framework 2.0/3.0 System.Security covers everything so the Security Application Block is not as valuable as it was before?

Please shed some lights. Thank you in advance.

Jun 13, 2007 at 2:39 PM
In my opinion, WCF would be the best fit for customizing SOAP headers. WCF has extensibility points where you can inject your own custom code to alter the behavior at runtime. In addition, the custom code that you would write could be used across all of your applications where a custom SOAP header is required.

Paulo Morgado has written an article on how to implement a custom user-agent value in a SOAP header. It should provide you with enough detail to understand the mechanics of creating and configuring a WCF behavior: