L
L
Leo_Eldorado2019-03-27 14:20:20
C++ / C#
Leo_Eldorado, 2019-03-27 14:20:20

Is it possible to organize transparent reconnection using WCF?

Hello!
You need to implement transparent link recovery using WCF. By "transparent" I mean a situation in which, in the event of a connection break, the current method called on the WCF service will not terminate with an exception thrown, and if the connection was successfully restored, it will exit normally. Is it possible? It may be necessary to create your own channel class to communicate with the service, and already inside the methods of this class to intercept exceptions related to the loss of communication and restore it, thus. so that the calling code "doesn't notice" that there was a break in the connection? The solution in which we simply re-create the communication channel and call the method again does not suit me, because there are methods in the contract, the subsequent call of which depends on the previous ones. For example, methods for adding or removing users, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
John_Nash, 2019-03-27
@John_Nash

in the event of a connection break, the method currently called on the WCF service will not terminate with an exception thrown

it will not stop if the method itself does not provide for it. Just the client will get an exception instead of the server response

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question