0

当 silverlight 客户端每次轮询服务器以保持连接处于活动状态时,是否可以运行自定义代码。我的应用程序是可从 silverlight3 获得的彗星式轮询双工通信的实现。我发现它在每次投票时都会发送以下 Soap 消息。

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

4

1 回答 1

0

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.

于 2010-06-28T12:51:53.573 回答