ASP.NET - membership class and validation and access

Asked By Dilip Sharma on 13-Aug-12 07:36 AM
till now i use  normal user login and module or any form access ..
where i used to save login detail in sql server . and after validate login i check user role and in which module he has access .

but i want to know how to do all this why using membership class .
Example ->

i store my login detail in sql server 
i should use membership. validateuser() and other  function to validate .
in my application i have two fold 
1 - store
2 -account 
so my 1 user should only have access of store folder and all the form inside that
and other should have access of all this ..

can any one show me simple example on this ...
means how to do configuration for this ...

Thanks in advance 
Peter Bromberg replied to Dilip Sharma on 13-Aug-12 07:57 AM
The Membership class is only for authentication and basic information about the user. To handle roles, you must use the Role provider. Once this is set up and you have added roles and have added one or more roles to each user,
you can determine their permissions based on their roles.

For example, 
if User.IsInRole("Administrator")
Dilip Sharma replied to Peter Bromberg on 13-Aug-12 08:15 AM
this we need to add in asp.Net configuration where we can set all the user and roles ..
i m right ?
Dilip Sharma replied to Dilip Sharma on 13-Aug-12 08:22 AM 

i want to do like this ..
but my user , password and role should be in sql server and every thing should validate from sql server .