c# - 从 silverlight 公开和使用 NetTcpBinding

标签 c# silverlight wcf

我正在尝试使用 NetTCPBinding 公开和使用 WCF 服务(我已经使用了 basicHttpBinding),但我不知道如何使用这个新的 nettcpbinding 公开它。

我读到我可以使用 Microsoft Service Configurator Editor 来配置我的服务,但我找不到“分步”指南,所以我手动配置了它:

<services>
  <service behaviorConfiguration="Behavior" name="ServiceImplementation">
    <endpoint address="net.tcp://localhost:4445/Service" binding="netTcpBinding" bindingConfiguration="" name="Service" contract="IService" />
  </service>
</services>

现在我想从 Silverlight dll 项目中使用它,但我不知道如何尝试。如果我像处理 http 服务一样添加 Web 引用,它不会连接到“net.tcp://localhost:4445/Service”(它拒绝连接)。

我应该怎么做?你知道任何好的分步指南吗?提前致谢。

最佳答案

Silverlight 不支持所有绑定(bind)。 NetTcpBinding 是不受支持的。

参见 http://msdn.microsoft.com/en-us/library/cc896571(v=vs.95).aspx获取支持的列表。

关于c# - 从 silverlight 公开和使用 NetTcpBinding,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7766613/

相关文章:

c# - 如何反序列化复选框值的 JSON 数据?

silverlight - 缺少 System.Windows 引用

wpf - WCF/WPF 最佳实践 - WCF ChannelFactory 和 PRISM

c# - LocalStorage 重定向 Windows Phone 7

c# - 异步 WCF REST 服务中跨线程的上下文

c# - 等待 WCF 服务的最佳方式?

c# - 在图片框上绘制位图背景时出现内存不足错误

c# - 尝试获取用于在 ASP.NET Core MVC 中播种数据的注入(inject)服务

c# - Telerik RadCompression 问题 - 一段时间后页面丢失 View 状态

silverlight - Silverlight 的应用领域