简体   繁体   English

从Silverlight公开和使用NetTcpBinding

[英]Exposing and consuming NetTcpBinding from silverlight

I'm trying to expose and consume a WCF service using NetTCPBinding (I have basicHttpBinding working already) but I don't know how to expose it with this new nettcpbinding. 我正在尝试使用NetTCPBinding公开和使用WCF服务(我已经可以使用basicHttpBinding了),但是我不知道如何使用此新的nettcpbinding公开它。

I've read that I may use Microsoft Service Configurator Editor to configure my service but I can't find a "step-by-step" guide so I configured it manually: 我已经阅读到可以使用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>

Now I want to consume it from a Silverlight dll project and I don't know how to try it. 现在,我想从Silverlight dll项目中使用它,但我不知道如何尝试。 If I add a web reference as I do with the http services it doesn't connect to the "net.tcp://localhost:4445/Service" (it rejects the connection). 如果我像使用http服务那样添加Web参考,它就不会连接到“ net.tcp:// localhost:4445 / Service”(它会拒绝连接)。

How should I do it? 我该怎么办? Do you know any good step by step guide? 您知道任何良好的分步指南吗? Thanks in advance. 提前致谢。

Silverlight does not support all bindngs. Silverlight不支持所有绑定。 NetTcpBinding is one that is not supported. NetTcpBinding是不支持的一种。

See http://msdn.microsoft.com/en-us/library/cc896571(v=vs.95).aspx for a list of what is supported. 有关受支持内容的列表,请参见http://msdn.microsoft.com/zh-cn/library/cc896571(v=vs.95).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM