looking for WCF basicHttpBinding https tutorial or samples

17,631

Solution 1

See those excellent articles:

Marc

Solution 2

<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> 
Share:
17,631
George2
Author by

George2

Updated on June 30, 2022

Comments

  • George2
    George2 almost 2 years

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

    Currently, my WCF client and server works quite well with http. Now I want to add https support and still use basicHttpBinding. Any easy to learn tutorials? I do not want to make too much modification to my WCF client/server and want to find a way which involves minimal code change. :-)

    BTW: for IIS server certificate, I want client side to accept all server certificate. And I just use https encryption feature.

    thanks in advance, George

  • George2
    George2 over 14 years
    Very nice stuff, thanks Marc!
  • Chris Marisic
    Chris Marisic about 8 years
    Looks right to me in my arm chair.