<bindings>
      <basicHttpBinding>
        <binding name="gz_IWebdbService" closeTimeout="00:01:00" openTimeout="00:01:00"
          receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="sz_IWebdbService" closeTimeout="00:01:00" openTimeout="00:01:00"
             receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
             bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
             maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
             messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
             useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>      </basicHttpBinding>
    </bindings>
    <client>      <endpoint address="http://webdbservice.gz.ihk.com/WebdbService.svc"
        binding="basicHttpBinding" bindingConfiguration="gz_IWebdbService"
        contract="WebdbService.IWebdbService" name="gz_IWebdbService" />
  
      <endpoint address="http://webdbservice.gz.ihk.com/WebdbService.svc"
        binding="basicHttpBinding" bindingConfiguration="sz_IWebdbService"
        contract="WebdbService.IWebdbService" name="sz_IWebdbService" />
    </client>
An endpoint configuration section for contract 'WebdbService.IWebdbService' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name. 急求

解决方案 »

  1.   

     <endpoint address="FileSavePoint"
                      binding="netTcpBinding"
                      bindingConfiguration="NewBinding0"
                      name="FileSaveName"
                      contract="FileInterface.IFileInterface"  />
     <endpoint address="FileSavePoint1"
                      binding="netTcpBinding"
                      bindingConfiguration="NewBinding0"
                      name="FileSaveName"
                      contract="FileInterface.IFileInterface"  />
     <endpoint address="FileSavePoint2"
                      binding="netTcpBinding"
                      bindingConfiguration="NewBinding0"
                      name="FileSaveName"
                      contract="FileInterface.IFileInterface"  />像这样 你可以配置多个endpoint 都是在baseAddress下添加FileSavePoint1,2,3.
    其实你多个客户端可以修改契约,为 
     [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]