Hello Søren,
You can certainly acheive that by tapping into the events using a HttpModule...
the easiest way being using the global.asax httpmodule. It has events of
the likes of before request, after request etc
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
> Hi Dilip
>
[quoted text clipped - 40 lines]
>>>
>>> Søren
> What I'm trying to archive it to make sure that some initialization code is
> called before any of the webmethos code is executed. I've noticed that the
[quoted text clipped - 3 lines]
> What't I'd really like is the possibility to get a beforre_webmethod and a
> after_webmethod code called.
I have wanted that as well before. As you say, it should be an event or
even a method you can override in the SoapService class. That way, it would
work regardless of the transport (http, tcp, lpc, etc)

Signature
William Stacey, MVP
http://mvp.support.microsoft.com
Dilip Krishnan - 16 Feb 2005 19:58 GMT
Hello William Stacey [MVP],
There is in the asmx model using HttpModules... In the soapservice derived
world you can always derive from soap service and have events defined in
the service that get invoked based on the amount of information you need.
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
>> What I'm trying to archive it to make sure that some initialization
>> code
[quoted text clipped - 14 lines]
> or even a method you can override in the SoapService class. That way,
> it would work regardless of the transport (http, tcp, lpc, etc)
Sami Vaaraniemi - 17 Feb 2005 08:07 GMT
>> What I'm trying to archive it to make sure that some initialization code
> is
[quoted text clipped - 11 lines]
> would
> work regardless of the transport (http, tcp, lpc, etc)
You could override SoapService.Receive(SoapEnvelope message). To see which
method is about to be called, take a look at
message.Context.Addressing.Action.Value.
Regards,
Sami