我试图在Windows Server 2012 R2上运行网络服务,但是我收到以下错误
无法找到与绑定NetTcpBinding的端点匹配scheme net.tcp的基址。注册的基地址方案是[http]。
到目前为止我尝试过的解决方案:
我的web.config文件
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="Binding1" >
<security mode="Message">
<message clientCredentialType="Certificate"/>
</security>
</binding>
</netTcpBinding>
</bindings>
<services>
<service name="ServerName" behaviorConfiguration="ServerInternet" >
<endpoint address=""
binding="netTcpBinding"
bindingConfiguration="Binding1"
contract="Namespace.Interface"
bindingNamespace="http://www.mycompany.com/webservices"
/>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8080/WebService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServerInternet">
<!-- certificate infos here -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
高级设置:
我已在服务器上安装的功能:
游泳池设置:
网站绑定
出现此错误的原因是什么?
答案 0 :(得分:2)
问题是您没有在服务器管理器中启用TCP激活和TCP端口共享,这不会加起来,因为这是IIS中net.tcp所必需的。