views:

13

answers:

0

I have derived a class from DuplexChannelFactory, and one of the constructors of the derived class takes System.ServiceModel.InstanceContext and System.ServiceModel.Description.ServiceEndpoint arguments. I simply pass them down to the base DuplexChannelFactory class, e.g.:

public DerivedDuplexChannelFactory(System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Description.ServiceEndpoint endPoint) : base(instanceContext, endPoint) {}

The problem I am running into that I get timeout exceptions when trying to callback the client during a service call, e.g.:

Client subscribes to Service Client calls some Service method, which will callback to the client

Before I go further, if I call down to a different base constructor of DuplexChannelFactory, things work perfectly, e.g.:

public DerivedDuplexChannelFactory(System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Description.ServiceEndpoint endPoint) : base(instanceContext, endPoint.Binding, endPoint.Address) {}

If I use the former, I get the following exception:

"This request operation sent to http://schemas.microsoft.com/2005/12/ServiceModel/Addressing/Anonymous did not receive a reply within the configured timeout (00:00:59.9820000). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client."

As stated however, if I use the latter, everything works perfectly. So I guess my question is twofold. First, is this a bug? If not, what could there be in the ServiceEndPoint parameter that could be causing this?

Like I said, I've gotten around this, but I'd like to know why it's not working.

I put together a simple sample app to illustrate this - let me know if you'd like it posted.

Thanks, Dave