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

Posted by RoastedBattleSquirrel on Stack Overflow See other posts from Stack Overflow or by RoastedBattleSquirrel
Published on 2010-06-15T22:26:01Z Indexed on 2010/06/15 22:32 UTC
Read the original article Hit count: 205

I'm stuck with a bit of an annoying problem right now. I've got a Silverlight 4 application (which runs OOB by default). It uses WCF with net.tcp as means of communicating with the server. The client uses a central instance of the wcf client proxy. As long as everything keeps running on the server side, everything's fine.

If i kill the server in the middle of everything, i drown in an avalanche of exceptions on the client side (connection lost, channel faulted etc etc).

Now i'm looking for a way to handle this in a clean and centralized way (if centralized is possible).

The SL app has one central client object sitting in App.cs (public static MyClient Client { get;set;}), which gets initialized on application start.

Any idea how to properly handle any connectivity problems on the client object?

© Stack Overflow or respective owner

Related posts about silverlight-4.0

Related posts about wcf-client