wcf-callbacks

Using a Callback to pass an Event to a WCF Client

假如想象 提交于 2019-12-11 22:50:04
问题 I am trying to have my WCF client receive info from a callback. I have created a Client Library that any WCF Client can use to connect to my WCF Service. I am uncertain if I should implement the Callback in the Client Library or the WCF Client itself. I have attempted to create an event that will be fired by calling the OnNotification(...) method from within the callback. However, it cannot be called from within the Callback method and I'm not sure why. Here is my Client Library used to

WCF Duplex: How to handle thrown exception in duplex Callback

北战南征 提交于 2019-12-11 03:13:59
问题 How do I handle an exception thrown in a callback method on the client in a WCF duplex setup? Currently, the client does not appear to raise the faulted event (unless I'm monitoring it incorrectly?) but any subsequent to call Ping() using the the client fails with CommunicationException: "The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.". How do I deal with this and recreate the client etc? My first question

WCF - client callback recommended?

丶灬走出姿态 提交于 2019-12-11 01:52:42
问题 I have one WCF service that exposes two operations - IncrementList() and GetList(). Client B connects to the service, calls GetList() and displays to the user. Client A has the ability to update this list by calling IncrementList(). I want Client B to get notified when IncrementList() is called so it can call GetList() again to display the updated data. Could you please outline how you'd implement this? CallBacks? Duplex? Publisher/Subscriber? Anything new in WCF 4.0 that aids in this

How can I send a notification message from server to all clients in WCF (broadcast you can say)?

泄露秘密 提交于 2019-12-05 01:31:04
问题 I want to send notification message every second from net tcp WCF service to all clients, Broadcast you can say? After the helpful answers I wrote the following method that will send notifications (heartbeat) to all connected users foreach (IHeartBeatCallback callback in subscribers) { ThreadPool.QueueUserWorkItem(delegate(object state) { ICommunicationObject communicationCallback = (ICommunicationObject)callback; if (communicationCallback.State == CommunicationState.Opened) { try { callback

WCF Callback Service with netTcp Binding timeout after 10 mins

梦想的初衷 提交于 2019-12-01 18:04:07
I'm creating a chat application with WCF(using callback contract) and netTcpBinding. I'm hosting the service as a windows service and accessing it from other computers via the client application. The problem that i'm facing now is the clients connection comes to a Fault state after 10 mins which seems to be some kind of timeout that occur. I already tried increasing the received timeout and send timeout in both service and client but didn't work. which setting should i change to increase this timeout period and in which application, service or client? Following are my configuration files,

WCF Callback Service with netTcp Binding timeout after 10 mins

岁酱吖の 提交于 2019-12-01 17:54:30
问题 I'm creating a chat application with WCF(using callback contract) and netTcpBinding. I'm hosting the service as a windows service and accessing it from other computers via the client application. The problem that i'm facing now is the clients connection comes to a Fault state after 10 mins which seems to be some kind of timeout that occur. I already tried increasing the received timeout and send timeout in both service and client but didn't work. which setting should i change to increase this