Exforsys.com
 
Home 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 4

Page 4 of 4


Most 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.


The Role Provider

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


Read Next: ASP.NET 2.0 Tutorials : Configuring Page-Level Caching



 

 

Comments


Ghulam Abbas said:

  great for me. I was looking for this stuff..

I have learned alot.


Ghulam Abbas
July 24, 2007, 8:18 am

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape