We are trying to log Web Service Requests using a SOAP Extension. We have
about 10 different web services, and we do not want to modify any of them.
The only thing we would like to modify is the machine.config on the web
services server i.e.
<webServices>
<soapExtensionTypes>
<add type="WebServiceTrace.WebServiceTrace,WebServiceTrace" priority="1" />
</soapExtensionTypes>
</webServices>
However, the SOAP Extension is never called. What are we doing wrong?
For testing we are only using one web service and modifying it's web.config.
That shouldn't be any different than modifying the machine.config, once it
goes to production, correct?
Below is the ProcessMessageSection of our WebServiceTraceClass,
Public Overrides Sub ProcessMessage(ByVal message As SoapMessage)
Select Case message.Stage
Case SoapMessageStage.BeforeSerialize
' do nothing
Case SoapMessageStage.AfterSerialize
'WriteOutput(message)
Case SoapMessageStage.BeforeDeserialize
WriteInput(message)
Case SoapMessageStage.AfterDeserialize
' do nothing
Case Else
Throw New Exception("invalid stage")
End Select
End Sub
We are inheriting the SoapExtension class.
Thanks,

Signature
Mike Logan
[MSFT] - 04 Mar 2005 02:24 GMT
Hi Mike,
Have you tried to reboot the server after you modified the machine.config?
Also, it the assembly strong named and be installed in GAC? Here is a
sample, which successfully added soapextension in machine.config, you may
refer to it:
Digging into SOAP Headers with the .NET Framework
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/h
tml/service06182002.asp
Luke