我正在尝试在启用IIS 7.5 net.tcp的情况下发布WCF服务,但我收到以下错误:
无法找到与scheme net.tcp匹配的基地址 绑定NetTcpBinding的端点。注册的基地址方案 是[http]。
附上web.config
<system.serviceModel>
<services>
<service name="BLAlgorithmService" behaviorConfiguration="BLAlgorithmService.Behavior">
<host>
<baseAddresses>
<add baseAddress="http//localhost:56795/Algorithemservice" />
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding"
bindingConfiguration="DuplexBinding"
contract="IBLAlgorithmService" />
<endpoint address="mextcp" binding="mexTcpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="BLAlgorithmService.Behavior" >
<serviceMetadata httpGetEnabled="true"/>
<serviceThrottling maxConcurrentSessions="10000" />
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
<behavior name = "MEX">
<serviceMetadata httpGetEnabled="true"/>
<serviceThrottling maxConcurrentSessions="10000" />
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="DuplexBinding"
maxReceivedMessageSize="64000000"
maxBufferPoolSize="64000000"
closeTimeout="02:50:00"
openTimeout="02:50:00"
receiveTimeout="02:50:00"
sendTimeout="02:50:00">
<readerQuotas
maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<reliableSession ordered="true"
inactivityTimeout="10:50:00"
enabled="false" />
<security mode="None"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
答案 0 :(得分:1)
您的基地址应为net.tcp://localhost:56795/Algorithemservice