Role-Based Security

In Chapter 9, we looked at the role-based security mechanism offered by .NET. A similar role-based security service is offered by COM+. There are a few noteworthy differences:

  1. The role-based security mechanism under COM+ works only for Windows principals. .NET offers a more generalized role-based security mechanism; the roles can be based either on Windows principals (WindowsPrincipal) or on generic principals (GenericPrincipal).

  2. Under .NET, the roles defined by WindowsPrincipal are tied to the local Windows user groups. Under COM+, however, the roles can be arbitrarily defined. Each role can be assigned zero or more individual users or user groups.

Let's extend our employee salary program to deal with role-based security. ...

Get .NET Programming: A Practical Guide Using C# 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.