Tutorials
ASP.NET 2.0
ASP.NET 2.0 Free Tutorials : Managing Membership and Roles
ASP.NET 2.0 Free Tutorials : Managing Membership and Roles - Page 2
ASP.NET 2.0 Free Tutorials : Managing Membership and Roles - Page 3
ASP.NET 2.0 Free Tutorials : Managing Membership and Roles - Page 4Most of the methods of the Role class are directed towards querying for user roles. The role information is stored in an encrypted format in a cookie sometimes. When this happens ASP.NET checks for the cookie and decrypts the role ticket and attaches the role information to the User object. The cookie is valid only for the duration of the request for the current user. Other user information, if requested is read from the data store using configured role provider.
Cookie support can be enabled if the cacheRolesInCookie attribute is set to true in the Web.config file. It must be remembered that the Role class is really a string that represents and enables administration by its name. There is no direct relationship between the role class and membership management. The users are also administered as a string.
Another feature of the Role assignment tools in ASP.NET is the Role Provider. The RoleProvider inherits from the RoleProvider class and the schema is not very different from the membership provider. Many of the methods used are similar the membership provider class in name and functionality.
ASP.NET comes with two built in providers AccessRoleProvider and SqlRoleProvider.
The Membership API and the Role Management API have really made the life of the web application developer easy. The API built around the concept of a provider, exposes a suite of methods that are not tied to physical data store. This is particularly useful in personalization. The interfaces also make the type of data store irrelevant because any kind of data store can be accessed through the provider.
First Page: ASP.NET 2.0 Free Tutorials : Managing Membership and Roles
|
great for me. I was looking for this stuff.. I have learned alot. Ghulam Abbas |