Hello I have created an ASP.NEt MVC 4 project in VS 2012. I read a lot of articles about security, membership etc and I am a bit confused. I have a database schema in SQL SERVER that has two tables for handling security. One called Users and contains fields
like userId(PK),UserName,Password and RoleId (FK) and a second table that has the Roles info, RoleID(PK), roleName.
I want to use the AuthorizeAttribute in my actions which seems very useful but I don't want to generate any extra tables in my database or anywhere else, which as I understand the SimpleMembershipProvider does.
What can I use in my situation?
Which MembershipProvider approach can I use by keeping only the two tables that I have in my DataBase and not creating additionals?
kostas-mvc
0 Points
1 Post
ASP.NET Security with custom Database schema
Dec 06, 2012 09:34 AM|LINK
Hello I have created an ASP.NEt MVC 4 project in VS 2012. I read a lot of articles about security, membership etc and I am a bit confused. I have a database schema in SQL SERVER that has two tables for handling security. One called Users and contains fields like userId(PK),UserName,Password and RoleId (FK) and a second table that has the Roles info, RoleID(PK), roleName.
I want to use the AuthorizeAttribute in my actions which seems very useful but I don't want to generate any extra tables in my database or anywhere else, which as I understand the SimpleMembershipProvider does.
What can I use in my situation?
Which MembershipProvider approach can I use by keeping only the two tables that I have in my DataBase and not creating additionals?
Thank you!
BrockAllen
All-Star
27434 Points
4891 Posts
MVP
Re: ASP.NET Security with custom Database schema
Dec 07, 2012 02:18 PM|LINK
Personally I never use membership:
http://brockallen.com/2012/09/02/think-twice-about-using-membershipprovider-and-simplemembership/
To help get you started, I have a sample for doing custom identity management:
https://github.com/brockallen/BrockAllen.MembershipReboot
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/