New Features in WCF 4.5 – Part 6

By | May 7, 2014

In this WCF Tutorial Series on “New Features of Windows Communication Foundation v4.5”, we have covered a lot of exciting features like Simplified Configuration, WCF Configuration Validation, ASP.NET Compatibility Mode default change, BasicHttpsBinding, Task-based Programming model etc. In this part-6 of WCF Tutorial, we will explore the following:

  • Multiple Authentication Support
  • Contract First Development

Before we start discussing more new features in this Part-6 of WCF 4.5 tutorial, lets recap the previous parts briefly.

 

WCF – Multiple Authentication Support

In previous versions of Windows Communication Foundation, if we wanted to have multiple authentications for a single service, we achieve this by creating separate endpoint for that particular WCF Service. But now, WCF 4.5 supports Multiple Authentications at single endpoint. So, we can configure single endpoint of a WCF Service to support multiple authentications (e.g. Windows, Basic, Anonymous, etc).
Multiple Authentication in WCF 4.5
Above diagram clearly describe how multiple authentication is supported by WCF 4.5.
Multiple Authentication can be achieved in two simple steps as follows:
  • In IIS, host the WCF Service and enable multiple authentications like Anonymous, Basic or Windows Authentication.
  • In configuration file, update security mode settings as follows:
    <security mode=”TransportCredentialOnly”>
    <transport clientCredentialType=”InheritedFromHost” />
    </security>

WCF – Contract First Development

As we know that with previous versions of Windows Communication Foundation, while creating proxy using SvcUtil.exe tool, the output generated file contains the Service ContractClient operations as well as Data Contracts. There was no way to generate the Service Contract only. But with Windows Communication Foundation v4.5, now its possible to generate the Service Contract only using SvcUtil.exe tool as follows:

svcutil.exe “http://localhost:MyFirstWCFService/Service1.svc?wsdl” /serviceContract

Top 10 Interview Questions and Answers Series:

Category: Uncategorized Tags:

About IMRAN ABDUL GHANI

Imran Abdul Ghani is working as Software Developer(Senior) with extensive knowledge in Web development technologies especially C#, ASP.NET, MVC, WCF, Web API, ADO.NET Entity Framework, jQuery etc. He has several years of experience in designing/developing enterprise level applications. He is Microsoft Certified Solution Developer for .NET (MCSD.NET) since 2005. You can reach his blogging at www.webdevelopmenthelp.net, www.topwcftutorials.net, and www.sharepointfordummies.net.

One thought on “New Features in WCF 4.5 – Part 6

  1. Pingback: Maillot de psg

Comments are closed.