O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Securing a service using role-based security

Security is the primary concern for any application or service. The WCF services are no exception. There are many ways to secure a service. One of them is based on the "who can access what" principle. In other words, only those users who have certain privileges can access certain services or service methods. The privileges are defined via roles. Windows has certain built-in roles, such as Administrators, Users, Guest, and so on. We can configure the access to the service methods based on these roles so that any user who does not have that specific role will not be able to execute the method.

In this recipe, we will configure PingService so that only those users who have the Administrator's role will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required