error handling - WCF net.tcp server disconnects - how to handle properly on client side? -


I'm stuck with a problem now. I have a Silverlight 4 app (which runs OOB by default). It uses WCF with net.tcp as the means of communication with the server. The client uses the central example of the WCF client proxy. As long as everything runs on the server, everything is fine.

If I kill the server in the middle of everything else, then I swept into an avalanche of exceptions on the client side (lost connection, channel faulty etc.) etc.)

Now I am exploring a way to handle it in a clean and centralized manner (if centralized is possible).

In SL App, a central client object is sitting in App.cs (Public Static MyClient Client {get; set;}), which starts when the application is started.

Any ideas on how to organize any connectivity issues on the client object properly?

You mention that you central for example the WCF client proxy .

If this is the case, when a server error occurs, the proxy goes to the foisted position to keep things centrally, you enter the client proxy in ICommuicationObject and Faulted event can change the event handler, which replaces the faulty proxy when the event is activated with a new proxy.

General alerts about thread protection for centralized access to resources apply!


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -