Wcf 协议';net.tcp';不支持
我的WCF服务给了我 “不支持协议'net.tcp'。”Wcf 协议';net.tcp';不支持,wcf,wcf-binding,Wcf,Wcf Binding,我的WCF服务给了我 “不支持协议'net.tcp'。” 您缺少nettcp的基址-或者您需要在端点中定义完整的nettcp地址。您当前的netTcp端点如下所示: <endpoint address="" binding="netTcpBinding" 现在可以在net上访问net.tcp端点。tcp://localhost:8888/JMSysSplashServer 解决方案2:在网络中定义完整地址。Tcp端点: <services> <s
您缺少nettcp的基址-或者您需要在端点中定义完整的nettcp地址。您当前的netTcp端点如下所示:
<endpoint address="" binding="netTcpBinding"
现在可以在net上访问net.tcp端点。tcp://localhost:8888/JMSysSplashServer
解决方案2:在网络中定义完整地址。Tcp端点:
<services>
<service name="JMSysSplash.CommunicationServer.JMSysSplashServer"
behaviorConfiguration="Service1Behavior">
<endpoint address="" binding="wsHttpBinding"
contract="JMSysSplash.CommunicationClient.IJMSysSplashServer">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
<endpoint
address="net.tcp://localhost:8888/JMSysSplashServer"
binding="netTcpBinding" bindingConfiguration="tcpBinding"
contract="JMSysSplash.CommunicationClient.IJMSysSplashServer"/>
.......
</service>
</services>
.......
定义端点时,您可以
- 定义一个完整地址(使用
和端口号以及全部)net.tcp
- 您定义了一个相对地址(例如
),但在这种情况下,必须具有该方案的基址(此处:address=“
),而不仅仅是http基址net.tcp
问:是否支持WCF应用程序
答:是的,IIS Express支持WCF应用程序。如上所述,WCF仅在HTTP或HTTPS上受支持。不支持MSMQ和net.tcp上的WCF。我知道这是一个古老的问题,并且得到了解答,但我遇到了一个类似的问题,解决方法不同 虽然Danil是正确的,但是错过安装会导致同样的错误弹出。我的问题有点不同,为了其他人的利益写下这个答案 问题1 在应用程序所在网站的IIS中,右键单击并单击“编辑绑定” 确保net.tcp作为绑定信息设置为“808:*”的绑定之一存在 问题2 在IIS中的应用程序节点中,转到其“高级设置”并检查net.tcp是否在启用的协议列表中。e、 如果您需要支持后两种协议,“http,net.tcp”就可以使用 希望这有帮助
<services>
<service name="JMSysSplash.CommunicationServer.JMSysSplashServer" behaviorConfiguration="Service1Behavior">
.....
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/JMSysSplashServer.svc/"/>
<add baseAddress="net.tcp://localhost:8888/JMSysSplashServer"/>
</baseAddresses>
</host>
</service>
</services>
<services>
<service name="JMSysSplash.CommunicationServer.JMSysSplashServer"
behaviorConfiguration="Service1Behavior">
<endpoint address="" binding="wsHttpBinding"
contract="JMSysSplash.CommunicationClient.IJMSysSplashServer">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
<endpoint
address="net.tcp://localhost:8888/JMSysSplashServer"
binding="netTcpBinding" bindingConfiguration="tcpBinding"
contract="JMSysSplash.CommunicationClient.IJMSysSplashServer"/>
.......
</service>
</services>