You want to directly access or modify raw SOAP messages with .NET code.
Create a custom SOAP extension.
ASP.NET allows you to access the raw SOAP messages that are transmitted to and from a Web service, but only by creating a special SOAP extension class. This class is triggered automatically as the SOAP message passes through the following four stages on the server:
SoapMessageStage.BeforeDeserialize occurs immediately after the Web server receives the SOAP request message.
SoapMessageStage.AfterDeserialize occurs after the raw SOAP message is translated to .NET data types but just before the Web method code runs.
SoapMessageStage.BeforeSerialize occurs after the Web method code runs ...