【问题标题】:Error publishing WCF service with net.tcp bindings使用 net.tcp 绑定发布 WCF 服务时出错
【发布时间】:2011-10-15 10:15:20
【问题描述】:

我正在尝试在启用 IIS 7.5 net.tcp 的情况下发布 WCF 服务,但出现以下错误:

找不到与方案 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>

【问题讨论】:

  • 尝试将基地址指向您的 svc 文件(如果有)。并尝试在浏览器中访问 svc 文件。

标签: wcf-binding net.tcp


【解决方案1】:

你的基地址应该是net.tcp://localhost:56795/Algorithemservice

【讨论】:

  • 谢谢,我按照建议更改了服务 web.config,但仍然收到相同的错误 找不到与绑定 NetTcpBinding 的端点的方案 net.tcp 匹配的基地址.注册的基地址方案是 [http]。 谢谢,Rony
猜你喜欢
  • 1970-01-01
  • 2011-10-24
  • 1970-01-01
  • 2014-04-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-01-17
  • 2011-05-20
相关资源
最近更新 更多