Click here to Skip to main content
13,598,183 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


7 bookmarked
Posted 8 Feb 2012
Licenced CPOL

What's New in WCF 4.5? BasicHttpsBinding

, 8 Feb 2012
Rate this:
Please Sign up or sign in to vote.
BasicHttpsBinding in WCF 4.5

This is the seventh post in the WCF 4.5 series. In previous posts, we’ve examined two new security features of WCF 4.5 and IIS – multiple client credentials support, and default HTTPS endpoint support, both new features are IIS-specific (or to be more exact, web hosting specific). In this post, we will look into a new security configuration option in WCF 4.5 – the BasicHttpsBinding.

Previous Posts

  1. What’s new in WCF 4.5? Let’s start with WCF configuration
  2. What’s new in WCF 4.5? A single WSDL file
  3. What’s new in WCF 4.5? Configuration tooltips and intellisense in config files
  4. What’s new in WCF 4.5? Configuration validations
  5. What’s new in WCF 4.5? Multiple authentication support on a single endpoint in IIS
  6. What’s new in WCF 4.5? Automatic HTTPS endpoint for IIS

Transport security is supported in WCF since day 1, and you can configure it by setting the security mode of your binding:

        <binding name="secured">
            <security mode="Transport">
                <transport clientCredentialType="Windows"/>

Declaring transport security based endpoints is quite an easy task in WCF, but does require writing some binding configuration in the config file. WCF 4.5 helps reduce the amount of configuration by adding a new type of binding – basicHttpsBinding.

The basicHttpsBinding is similar to basicHttpBinding, only it has the following defaults:

  • Security mode = Transport
  • Client credential type = None

Setting up an endpoint with a basicHttps binding is quite simple:

  <service name="WcfServiceLibrary1.Service1">
        <add baseAddress = 
    "http://localhost:8733/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
        <add baseAddress = 
    "https://localhost:44310/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
    <endpoint address="" binding="basicHttpBinding" 

    <endpoint address="" binding="basicHttpsBinding" 


If you want to change the default client credential type for the secured endpoints, you will need to create a binding configuration for the secured endpoint:

        <transport clientCredentialType="Windows"/>

Note: Since this is a secured binding, the security mode can be either Transport or TransportWithMessageCredential only. TransportCredentialOnly is not supported for this type of binding.

Stay tuned for more posts about the new features of WCF 4.5. You can also follow me on Twitter (@IdoFlatow) to get updates as soon as new posts are published.

The RTM of .NET 4.5 is still to come, and I assume many of you are still adjusting to WCF 4. If you want to learn more about the new features of WCF 4, come to my session at Visual Studio Live! 2011 in Redmond (October 17-21).

Also, if you are an MCT and reside in the US, come hear my session about WCF 4 at the MCT 2011 North-America Summit that will be held in San-Francisco (October 19-21).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Ido Flatow
Architect Sela Group
Israel Israel
Web developer since 1997. I'm a senior architect at Sela Group in Israel. I'm a consultant, trainer (Microsoft MCT), and a speaker in conferences worldwide.
My main fields are WCF, ASP.NET, Windows Azure, IIS, Entity Framework, and Silverlight.

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.180621.3 | Last Updated 8 Feb 2012
Article Copyright 2012 by Ido Flatow
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid