Click here to Skip to main content
15,906,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
-----------------------
XML
<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

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.
Posted
Updated 8-Nov-11 2:04am
v4

I do not see "Contract" specified in your web.config.

Without "Contract" end-point is meaning-less.
 
Share this answer
 
Comments
Jithu T.E 8-Nov-11 8:06am    
Hi RaisKazi
I have updated the config details.Please find it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900