WCF, Silverlight: is request / response possible through PollingDuplexHttpBinding?

We used PollingDuplexHttpBindingfor some time for messaging Pub/Sub. We have methods that do not return results that allow customers to subscribe to some data feed, and then the service returns the data back through CallBackcontracts.

Only now we have added several methods Request/Replyto ours OperationContract. Because Silverlight 3 clients call these methods using a template async Begin() End(). The problem is that we cannot get this to work with help PollingDuplexHttpBinding. We always get the following error (when using the client HTTP client):

The server did not provide a meaningful response; this can be caused by a contract mismatch, a premature disconnection of the session, or an internal server error.

In the browser stack we get HTTP 500: Not Found.

When switching to BasicHttpBindingmethods, they Request/Replyare called completely fine, but obviously the methods Pub/Subcannot be used with this binding.

We could use two separate endpoints for each type of message, but would prefer and not strange that the binding will only support the template Pub/Sub(although this is the motivation for PollingDuplexHttpBinding).

Can anyone clarify this for me? Is it possible?

+3
source share
1 answer

. BasicHttpBinding Request/Reply Silverlight 4 WCF 4. ( Silverlight) Per-Call. , , WCF Sessionful, PollingDuplexHttpBinding Silverlight, Callback Contracts .

Request/Reply PollingDuplexHttpBinding, ...

+2

Source: https://habr.com/ru/post/1739270/


All Articles