Authorizing through declarative role-based access control

Role-based authorization is a commonly used access control approach in .NET-based applications. Developers can either use code (programmatically) or apply attributes (declaratively) so as to define particular access control rules on .NET code based on the current security identity principal. For WCF service operations, it also naturally supports role-based authorization and access control, and it is quite straightforward to add declarative style role-based access control over service operations without writing any code.

How to do it...

Here we will go through the steps for applying declarative style role-based access control for WCF service operations.

  1. Choose a proper authentication type ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.