无法找到与绑定NetTcpBinding的端点匹配scheme net.tcp的基址

时间:2012-02-29 22:11:19

标签: wcf nettcpbinding

我有一个带有basichttp绑定的服务,我正在尝试添加一个net.tcp绑定。这是配置的样子:

<services>
      <service behaviorConfiguration="ServiceBehavior" name="Some.L.E.S.BusinessService">


        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBusinessService"
          contract="Some.L.E.Services.IBusinessService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint> 


        <endpoint address="/BusinessService.svc" binding="netTcpBinding" bindingConfiguration="netTcpBinding_IBusinessService" contract="Some.L.E.Services.IBusinessService">
              <identity>
                  <dns value="localhost" />
              </identity>
          </endpoint>


          <host>
              <baseAddresses>
                 <add baseAddress="http://localhost:63487/"/> 
                 <add baseAddress="net.tcp://localhost/" />
              </baseAddresses>
          </host>


      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
          <behavior name="ServiceBehavior">
            <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
            <serviceMetadata httpGetEnabled="true"/>
            <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
            <serviceDebug includeExceptionDetailInFaults="true"/>
          </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

    <!-- Start of HostServices client configurations -->
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IBusinessService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
          </security>
        </binding>

 </basicHttpBinding>
        <!-- RSF -->
        <netTcpBinding>
            <binding name="netTcpBinding_IBusinessService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            hostNameComparisonMode="StrongWildcard"
            maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
            transferMode="Buffered">
                <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
     maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                    <transport clientCredentialType="None"/>
                </security>
            </binding> 
        </netTcpBinding>
    </bindings>

我在VS2010中启动此服务,我正在尝试从另一个VS2010项目连接到它。但是我收到以下错误:

无法找到与绑定NetTcpBinding的端点匹配scheme net.tcp的基址。注册的基地址方案是[http]

大多数解决方案似乎建议更改IIS虚拟目录中的web.config。但我的服务不在IIS中托管。

非常感谢任何帮助。

谢谢,

GM

0 个答案:

没有答案