0

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.

thecaptain0220
  • 2,098
  • 5
  • 30
  • 51
  • It seems that if I change the inactivityTimeout to a very high number this doesn't happen. The thing I don't understand then is what resets this timeout? I'm using the client but it still times out. – thecaptain0220 Nov 01 '12 at 19:08
  • check out sendTimeout, it should be set to 1-2 minutes, also set receiveTimeout to big value like few hours – sll Dec 12 '12 at 10:54

0 Answers0