mvc simple membership

ITsolutionWizard
ITsolutionWizard used Ask the Experts™
on
I also want to create my own super simple membership website for my personal usage.
let us assume the db table called role has two roles, admin, user. if I want to restrict the controllers (mvc) base on the roles.
how can I do that?

[role = admin]
Controller HIAdmin
[role = user]
Controller HiUser
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Incluye authorizations section in web.config ex:

<location path="HIAdmin">

     <system.web>
            <authorization>
                   <allow roles="admin"/>
               </authorization>
    </system.web>

</location>

Remove locación for all site.

Author

Commented:
I don't get it. and how to implement on the controller side

Author

Commented:
any helps?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial