1

I have a WCF server returning JSON working fine. Until I access the page via SSL (Certificate is installed) I have the following configuration

<system.serviceModel>
<services>
  <service name="Analytics">
    <endpoint name="jsonEP"
            address=""
            binding="webHttpBinding"
            behaviorConfiguration="json"
            contract="IAnalytics"/>     
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="json">
      <webHttp faultExceptionEnabled="true" helpEnabled="true" />      
    </behavior>     
  </endpointBehaviors>
</behaviors>

What do I need to change to enable my service to be SSL enabled?

I access the entry page with https://mysite/Service/Analytics.svc but the message gives svcutil.exe http://machinename/Service/Analytics.svc?wsdl

when it should be http://mysite/Service/Analytics.svc?wsdl

Also any Get Requests fail ex: http://mysite/Service/Analytics.svc/MyURITemplate/Id/1

thanks.

Brian
  • 1,845
  • 1
  • 22
  • 37

2 Answers2

5

You need to define a binding element and set the security to transport.

Have a look at a sample here.

Aliostad
  • 80,612
  • 21
  • 160
  • 208
  • It was close. but this is what worked http://stackoverflow.com/questions/5192132/wcf-service-with-jsonp-over-ssl – Brian Apr 08 '11 at 15:15
0

I found the solution.

I had to turn off IIS SSL Setting to Require SSL and follow this configuration. WCF service with JSONP over SSL

I still get the wrong URL in the Analytics.svc "homepage"

"svcutil.exe http://machinename/Service/Analytics.svc?wsdl "

Community
  • 1
  • 1
Brian
  • 1,845
  • 1
  • 22
  • 37