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.
- New Features in WCF 4.5 - Part 1
- New Features in WCF 4.5 - Part 2
- New Features in WCF 4.5 - Part 3
- New Features in WCF 4.5 - Part 4
- New Features in WCF 4.5 - Part 5
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.).
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:
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