I'm currently working on an application that implements a polling duplex service. I am having issues with the client aborting and I'm not sure why or the right way to handle using the client.
Right now I am getting the client in a hello message like this
client = OperationContext.Current.GetCallbackChannel<IDuplexMyClient>();
Then I am just hanging on to that in my class and sending things using it like this
client.MyFunction(data);
There can be any amount of time in between sending data because it depends on user interaction. The problem I am having is I am getting this following error.
The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted. polling duplex
Is this the incorrect way to handle the client? Any idea why its aborting?
It also seems to do it even when I'm sending messages once a second over it, it seems like it just times out after a little while no matter what.