Search htps tutorial for htps WCF

I use VSTS 2008 + .Net 3.5 + C # to develop a console application as a WCF server and WCF host service in IIS 7.0 on the server side (server using Windows Vista x64).

Currently my client and WCF server work fine with http. Now I want to add support for https and still use basicHttpBinding. Any easily taught lessons? I do not want to make too many changes for my WCF client / server and I want to find a way that requires minimal code change. :-)

BTW: for an IIS server certificate, I want the client side to accept the entire server certificate. And I just use the https encryption function.

thanks in advance George

+3
source share
2 answers

See these excellent articles:

Mark

+7
source
<bindings>
  <basicHttpBinding>
    <binding name="defaultBasicHttpBinding">
      <security mode="Transport">
        <transport clientCredentialType="None"/>
      </security>
    </binding>
  </basicHttpBinding>
</bindings>

<system.serviceModel>       
  <services>
    <service behaviorConfiguration="MyServiceBehavior" name="MyServiceName">       
      <endpoint address="https://XYZ.com/MyService.svc"
                binding="basicHttpBinding"
                bindingConfiguration="defaultBasicHttpBinding"
                contract="Axis.IServiceContract" />
      <behaviors>
        <serviceBehaviors>               
          <behavior name="MyServiceBehavior">
            <serviceMetadata httpsGetEnabled="true"/>
            <serviceDebug includeExceptionDetailInFaults="false"/>
          </behavior>
        </serviceBehaviors>
      </behaviors>
    </service>
  </services>
</system.serviceModel> 
+1
source

Source: https://habr.com/ru/post/1716181/


All Articles