WCF: how to detect a gap and get the original context in WsHttpBinding

I have a request-response service method WsHttpBindingthat processes a transaction in a mid-range service (which connects to the database) and returns a response message to the client with the transaction ID.

I have a couple of questions:

  • How can I detect when a client unexpectedly disconnects / fails before receiving a response? I noticed that the channel_faulted event never fires for WsHttpBinding.

  • Assuming # 1 can be achieved, how can I get the original transaction identifier (which was in the outgoing response) so that the transaction is rolled back / reverse that the client did not receive?

Any help is appreciated. Thank.

+3
source share
1

-, , . , .

, , , - - NetTCPBinding WSHttpBinding. , .

7 Juew Lowy Programming WCF Services. 7 WCF.

WCF WCF.

WCF, - , ( ). , . WCF .

. - :

<netTcpBinding>
  <binding name="TransactionalTCP" transactionFlow="true">
    <reliableSession enabled="true"/>
  </binding>
</netTcpBinding>
0

All Articles