jeudi 26 janvier 2017

How can I use a WCF with a SSL Certificate HTTPS IIS

I have a couple days trying to fix a problem with my WCF that do work when the Bindings are HTTP. But once I buy a SSL certificate and I configure my website to work in HTTPS, when I changed the bindings on IIS my application has been unavailable.

I got the following error message: Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https].

My web.config

<services>
  <service behaviorConfiguration="WebServiceBehavior" name="WcfService1.Service">
    <endpoint address="" behaviorConfiguration="jsonBehavior" binding="webHttpBinding"
              bindingConfiguration="webHttpBindingWithJsonP" contract="WcfService1.IService"/>
    <endpoint address="soap" binding="basicHttpBinding" contract="WcfService1.IService" />
  </service>
</services>

<behaviors>
  <endpointBehaviors>
    <behavior name="jsonBehavior">
      <webHttp helpEnabled="true"/>
    </behavior>
  </endpointBehaviors>

  <serviceBehaviors>
    <behavior name="WebServiceBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>

<bindings>
  <webHttpBinding>
    <binding name="webHttpBindingWithJsonP"
             crossDomainScriptAccessEnabled="true"   />

  </webHttpBinding>

</bindings>

It is possible to get my WCF working with HTTPS ?




Aucun commentaire:

Enregistrer un commentaire