WCF SSL for load balancing. Change ssl port load balancing

My client application is trying to call the wcf service using transport security. The wcf service is located on two nodes behind the hardware load balancer.

The hardware load balancer receives a wcf call on port 443, and then changes the port to 44556. This gives an endpoint mismatch error. The guys who monitor our production and qa departments here do not want the wcf service sitting on port 443 for any reason, and therefore why they are setting up a port change.

Then I changed the load balancing so as not to change the port to 44556, but leave it as port 443, and the service is called as expected.

My question is: is there any configuration I can do for my \ IIS service that will allow the service to accept a wcf call on port 44566 when it came from port 443?

Thanks,

+4
source share
1 answer

Yes, you need to change the server and client bindings. Check clientVia .

On the server: Add the listenUri attribute to the endpoint and change the address name to your service using the urn. (name for customer)

 <endpoint address="urn:MyService" listenUri="https://localhost:443/MyService" binding="customBinding" bindingConfiguration="NetHttpBinding" contract=Interface.ITradingPlatform"/> 

On the client:

For example, instead of specifying the URL in the endpoint address field, add an urn, and then add the behaviorConfiguration attribute:

 <endpoint name="ServerHTTP" address="urn:MyService" binding="customBinding" bindingConfiguration="NetHttpBinding" contract="Client.ITradingPlatform" behaviorConfiguration="BehaviorHTTP"> </endpoint> 

You also need to define the behavior of the Configuration:

 <behaviors> <endpointBehaviors> <behavior name="BehaviorHTTP"> <clientVia viaUri="https://yourdomain.com:443/MyService"/> </behavior> </endpointBehaviors> </behaviors> 
+3
source

All Articles