具有多个端点的WCF双工服务

时间:2022-08-26 19:49:30

I have a service that uses duplex requests for calling back to the client application. I have currently exposed a single endpoint with a NetNamedPipeBinding, this is all working correctly.

我有一个使用双工请求回调客户端应用程序的服务。我目前使用NetNamedPipeBinding公开了一个端点,这一切都正常工作。

When i add a basicHttpBinding i get the follow exception

当我添加basicHttpBinding时,我得到以下异常

Contract Requires Duplex, but Binding 'BasicHttpBinding' dosn't support it

合同需要双工,但绑定'BasicHttpBinding'不支持它

Is it possible to configure the service to allow duplex and basicHttp?

是否可以将服务配置为允许双工和basicHttp?

Thanks

Rohan

2 个解决方案

#1


As long as the contract has call backs then no, you can't use BasicHttpBinding because, as the exception says, it won't support everything your contract needs. If you want to have callbacks over HTTP then you need to use wsDualHttpBinding

只要合同有回调然后没有,你就不能使用BasicHttpBinding,因为,例外情况说,它不会支持你的合同所需的一切。如果你想通过HTTP进行回调,那么你需要使用wsDualHttpBinding

#2


Here is a list of the out-of-the-box binding types. It has a table that lists whether the binding supports duplex.

这是一个开箱即用的绑定类型列表。它有一个表,列出绑定是否支持双工。

#1


As long as the contract has call backs then no, you can't use BasicHttpBinding because, as the exception says, it won't support everything your contract needs. If you want to have callbacks over HTTP then you need to use wsDualHttpBinding

只要合同有回调然后没有,你就不能使用BasicHttpBinding,因为,例外情况说,它不会支持你的合同所需的一切。如果你想通过HTTP进行回调,那么你需要使用wsDualHttpBinding

#2


Here is a list of the out-of-the-box binding types. It has a table that lists whether the binding supports duplex.

这是一个开箱即用的绑定类型列表。它有一个表,列出绑定是否支持双工。