0

I run a WCF on IIS 7 with a load balanced server configuration.

Everything works fine when we run it normally but when we try to turn on SSL everything stops working. I have tried all the different config settings in web.config like Transport and Message but nothing seems to be working.

Won't even allow me to add the reference to the project and just comes back with a weird error about document types.

Everything works fine on our main webserver so I don't think its a problem with the digital cert.

Hans Then
  • 10,935
  • 3
  • 32
  • 51
WillSkills
  • 3
  • 1
  • 2
  • You need to change the WCF binding to allow for SSL transport. Could you post your binding configuration ? For the metadata publication over SSL, you also need to change mex endpoint binding and service behavior metadata publication. – Paciv Sep 14 '12 at 12:07
  • You'll need to be more specific about your problem, show us some code and configuration, tell us about the specific error, etc. (Place yourself in our position: it's very hard to answer the question as it currently is). Note that you can edit your question at any time! – Jeroen Sep 14 '12 at 12:09
  • Everything seems to work ok on our test server and I am correctly setting the setting in the bindings. I will speak to our server guy to find out more about how he has configured the SSL stuff as I did not do that myself – WillSkills Sep 14 '12 at 12:24

2 Answers2

2

I don’t know if you are using SSL acceleration on the load balancer to hold the certificate. If you are this might explain the error.

We had a similar problem with our servers when we implemented load balancing. The problem is that the SSL Acceleration interferes with the way that WCF picks up the reference when you add a Service Reference.

There is an article here that explains how to fix the problem. It has diagrams and stuff that as well.

Tarman
  • 46
  • 2
  • I checked with my server guy and he is hosting the digital cert on the load balancer. When we installed the cert on our test server and changed dns it all worked fine. I did have my httpsGetEnabled still set to http so I think that also helped. – WillSkills Sep 14 '12 at 12:56
1

Have a look at this link http://www.codeproject.com/Articles/36705/7-simple-steps-to-enable-HTTPS-on-WCF-WsHttp-bindi

and also have a look at the following

You must configure your service to use HTTPS:

<bindings>
  <basicHttpBinding>
    <binding name="https">
      <security mode="Transport" />
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="metadata">
      <serviceMetadata httpsGetEnabled="true" />  
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service name="..." behaviorConfiguration="metadata">
    <endpoint address="..." contract="..." binding="basicHttpBinding"
              bindingConfiguration="https" />
  </service>
</services>
Raja Fawad
  • 737
  • 6
  • 9