views:

19

answers:

1

Hi,

Is it possible to run custom code when the silverlight client polls everytime to the server to keep the connection alive. My application is a implementation of the comet style polling duplex communication which is available from silverlight3. I found that it sends the following Soap message on every poll.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
<s:Body>
    <wsmc:MakeConnection xmlns:wsmc="http://docs.oasis-open.org/ws-rx/wsmc/200702"&gt;
        <wsmc:Address>
            http://docs.oasis-open.org/ws-rx/wsmc/200702/anoynmous?id=7f64eefe-9328-4168-8175-1d4b82bef9c3
        </wsmc:Address>>
    </wsmc:MakeConnection>
</s:Body>

A: 

I believe that should be possible, but having not worked with duplex services myself I can't be 100% on this. I've used the following method: System.ServiceModel.Dispatcher.IDispatchMessageInspector.AfterReceiveRequest implemented on the server side to intercept all incoming messages to strip out some security information from the message and run some custom code before it reaches the service layer.

I found this Paolo Pialorsi Article useful when implementing my solution.

Tanner