O'Reilly logo

Silverlight 4 Data and Services Cookbook by Kevin Dockx, Gill Cleeren

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

Using ASP.NET Roles in Silverlight

Very often, user accounts are grouped into roles. Roles are then appended rights in the application and all users in a specific role inherit the rights of the role. Users can be part of more than one role. The ASP.NET Membership API contains an implementation for roles as well. Using the Application Services we already explored in the previous recipe, we can expose role functionality as well so it can be used in a Silverlight application.

In this recipe, we'll extend the application so we can check if users are in a specific role.

Getting ready

This recipe requires that SQL Server or SQL Server Express is installed on your machine, as the code we are creating talks to a database.

To follow along with this recipe, ...

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