Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在wcf中找不到与绑定为NetTcpBinding的终结点的scheme net.tcp匹配的基址_Wcf - Fatal编程技术网

在wcf中找不到与绑定为NetTcpBinding的终结点的scheme net.tcp匹配的基址

在wcf中找不到与绑定为NetTcpBinding的终结点的scheme net.tcp匹配的基址,wcf,Wcf,我开发了简单的双工服务。我的服务项目有一个svc文件,名为ChatHandler.svc 当我右键单击svc文件并选择“在浏览器中查看”时,就会调用错误 找不到与绑定为NetTcpBinding的终结点的scheme net.tcp匹配的基址 我无法修复它。这里我给出了我的web.config端点详细信息 <services> <service name="ChatService.ChatHandler" behaviorConfiguration="behaviorCon

我开发了简单的双工服务。我的服务项目有一个svc文件,名为ChatHandler.svc

当我右键单击svc文件并选择“在浏览器中查看”时,就会调用错误 找不到与绑定为NetTcpBinding的终结点的scheme net.tcp匹配的基址

我无法修复它。这里我给出了我的web.config端点详细信息

<services>
  <service name="ChatService.ChatHandler" behaviorConfiguration="behaviorConfig">
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:1648/ChatService/ChatHandler.svc" />
        <add baseAddress="http://localhost:1647/ChatService/ChatHandler.svc" />
      </baseAddresses>
    </host>
    <endpoint address="tcp"
                      binding="netTcpBinding"
                      bindingConfiguration="tcpBinding"
                      contract="ChatService.IChat"/>

    <endpoint address="net.tcp://localhost:1645/ChatService/mex"
                      binding="mexTcpBinding"
                      contract="IMetadataExchange"/>
  </service>
</services>


告诉我我的端点出了什么问题。因此,我可以在浏览器中浏览我的svc文件。谢谢

最简单的方法是删除带有tcp基址的行,然后直接将整个地址写入
端点
节点(作为
地址
属性)。但是,请记住,您可能无法使用VisualStudioDevelopmentServer托管netTcp绑定。您应该将该服务托管在IIS中或作为自托管服务。