I am using membership in asp.net mvc 2 and i want to restrict users from using the admin section , Currently all the users can access the admin section by using their credentials, I used [Authorise] for all the http get and post request for that , but how can restrict everyone apart from admin & some users with certain privileges , I have got table in db asp_net Roles which have 2 role names : Admin and user.
You can do this ...
[Authorize(Roles = "Admin")]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With