Click here to Skip to main content
15,890,670 members
Articles / All Topics

New Features in WCF 4.5 - Part 6

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
7 May 2014CPOL2 min read 7.2K   5  
New features in WCF 4.5

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, let's 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 a 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

The above diagram clearly describes 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:
    XML
    <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 Contract, Client operations as well as Data Contracts. There was no way to generate the Service Contract only. But with Windows Communication Foundation v4.5, now it's possible to generate the Service Contract only using SvcUtil.exe tool as follows:

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

Previous <<< New Features in WCF 4.5 - Part 5

Other Related Tutorials that Might be of Interest

License

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


Written By
Software Developer (Senior) Emaratech
United Arab Emirates United Arab Emirates
Imran Abdul Ghani has more than 10 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 WCF Tutorials, Web Development, SharePoint for Dummies.

Comments and Discussions

 
-- There are no messages in this forum --