Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF, Silverlight: Is Request/Reply possible over PollingDuplexHttpBinding?

We have been using PollingDuplexHttpBinding for some time to do Pub/Sub messaging. We have methods that do not return results that allow clients to subscribe to some data feed then then the service pushes data back via CallBack contracts.

Just now we have been adding some Request/Reply methods to our OperationContract. As the clients are Silverlight 3 these methods are called using the async Begin() End() pattern. The problem is we cannot get this to work using PollingDuplexHttpBinding. We always get the following error (when client stack HTTP is used):

The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

With browser stack we get HTTP 500: Not Found.

When switching to BasicHttpBinding the Request/Reply methods are called completely fine, but obviously Pub/Sub methods cannot be used with this binding.

We could use two seperate endpoints for each type of messaging, but would rather not and it seems odd to me that a binding would only support the Pub/Sub pattern (even though this is the motivation for PollingDuplexHttpBinding).

Could someone clear this up for me? Is it possible?

like image 506
MrLane Avatar asked Feb 02 '26 04:02

MrLane


1 Answers

We never did get this to work. We use BasicHttpBinding for all of our Request/Reply operations between our Silverlight 4 apps and our WCF 4 services. These are all async method calls (have to be with Silverlight) to Per-Call services. For the couple of situations where we must do server push we have a Sessionful WCF service maintaining a PollingDuplexHttpBinding connection to the Silverlight client and we use Callback Contracts with One-Way methods to make calls.

Could never get Request/Reply operations to work with PollingDuplexHttpBinding, but never found an authority on the matter either...

like image 64
MrLane Avatar answered Feb 03 '26 21:02

MrLane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!