Net TCP binding: The URI prefix is not recognized

感情迁移 提交于 2019-11-29 14:02:19

When you create service that uses netTcpBinding and you want to Add service reference in Visual Studio you should use http address (httpGetEnabled) not actual tcp address the service listens on. So the solution was to set localhost/WcfTcpService/TestTcpService.svc as an url in Add service reference dialog.

I had same problem and I changed web.config as below:

<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
      <baseAddressPrefixFilters>
        <add prefix="net.tcp://YourBaseUrl"/>
      </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!