在负载均衡器上托管WCF服务时出错 [英] Error when hosting wcf services on load balancer

查看:105
本文介绍了在负载均衡器上托管WCF服务时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我一直在研究使用WCF服务和协议https的Windows应用程序,现在我们的客户端创建了一个负载平衡环境并在三台服务器中托管了服务.
1.在负载均衡器而非服务器上安装SSL证书.

2.因此,客户到负载均衡器之间的通信是HTTPS,而负载均衡器到服务器之间的通信是HTTP.

3.现在服务正在使用配置文件(webconfig),该文件是为在负载均衡器之前工作的https配置的.

webconfig详细信息
-----------------------

Hi I have been working on windows application that uses WCF service with protocol https.Now our client created a load balancing environment and hosted services in three server.Also he done the following steps for load balancer.

1.Installed SSL certificate on Load balancer instead of the servers.

2.So the communication between customer to load balancer is HTTPS and load balancer to server is HTTP.

3.Now services are using the configuration file(webconfig) which configured for https that worked on before load balancer.

webconfig details
-----------------------

<system.serviceModel>
    <services>
      <service behaviorConfiguration="TestService"

               name="Server.TestService">
        <host>
          <baseAddresses>
            <add baseAddress="https://server/rootfolder/" />
          </baseAddresses>
        </host>

        <endpoint address=""

                  binding="wsHttpBinding"

                  behaviorConfiguration="EndpointBehaviour"

                  bindingConfiguration="wsHTTP"

                  name="SOAP12"

                  contract="Server.ITestService" />

        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>

    <bindings>

      <wsHttpBinding>
        <binding name="wsHTTP" maxReceivedMessageSize="2147483647">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" />
          <security mode="Transport">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </wsHttpBinding>


      <basicHttpBinding>
        <binding name="HCWSBinding1" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="10:10:00"



maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" messageEncoding="Text" >
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>

          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647"



             maxNameTableCharCount="2147483647"  />

        </binding>
      </basicHttpBinding>




    </bindings>


    <behaviors>
      <endpointBehaviors>
        <behavior name="EndpointBehaviour">
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="TestService">
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled ="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>

      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>




现在我进入错误状态了

没有协议绑定匹配




Now i am getting below like errors

"No protocol binding matches


给定的地址"http:..... svc".协议绑定是在IIS或WAS配置的站点级别配置的. "


此集合已包含一个带有方案http的地址.此集合中每个方案最多可以有一个地址.
参数名称:项目"

请帮助我,如何解决它.

the given address ''http:.....svc''. Protocol bindings are configured at the Site level in IIS or WAS configuration. "


"This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item "

Please help me , how to resolve it.

推荐答案

尝试这些修复链接

大多数人说重新启动系统
没有协议绑定与给定地址匹配 [ WCF Web服务/IIS托管&防火墙背后的配置问题 [ ^ ]
没有协议绑定与给定地址''http://0.0.0.0:1143/Host/Service.svc'' [
Try these fix links

Most of them say Reboot the system
No protocol binding matches the given address[^]
WCF WebService / IIS Hosting & Configuration Issue Behind a Firewall[^]
No protocol binding matches the given address ''http://0.0.0.0:1143/Host/Service.svc''[^]


我没有看到指定的"合同"在您的web.config中.

没有"合同",端点毫无意义.
I do not see "Contract" specified in your web.config.

Without "Contract" end-point is meaning-less.


这篇关于在负载均衡器上托管WCF服务时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆