Can RoleProvider be used without MembershipProvider?

587 Views Asked by At

I would like to use RoleProvider in my application so that I can use the AuthorizeAttribute on my controller actions like so:

[Authorize(Roles = "Admin")]

However, I don't need (and don't want to use) a MembershipProvider as most of the authentication code has already been built in our ASP.net 4.5 web application.

So can I simply use a custom RoleProvider without using/implementing an out-of-the-box MembershipProvider or custom MembershipProvider and be able to use the AuthorizeAttribute?

Thank you.

0

There are 0 best solutions below