0

I'm working on an asp .net mvc 4 application. I have created a database for users and roles (one table for users and one other for their roles). I want to control the access to some pages. Just so you know I have many roles in my table (if there was only two roles this would have been easy to do). How can I do that? Is there any modification I shoud do on web.config? - is it possible to hide a button (for example) for some users (not to hide all the view) or is it obligatory to hide all the view?

1

1 Answer 1

0

There are a few questions like this, please see: ASP.NET MVC Authorization

The Authorize attribute is still valid and works well with the UserProvider and RoleProvider. http://msdn.microsoft.com/en-us/library/system.web.mvc.authorizeattribute.aspx

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.