ASPNET MVC3: Can I use my user/roles tables to handle user authentication?

大憨熊 提交于 2019-12-12 02:43:48

问题


I'm building an ASPNET MVC3 app; I have built, on the SQLServer DB, my users, roles and user_roles tables andI would like to use them instead of the aspnet_* tables built by using aspnet_regsql.exe.

Do you know if is this possible and, if so, in which way I can authenticate my users towards my tables?


回答1:


You just need to implement your own Membership and Role providers.

see How do I create a custom membership provider for ASP.NET MVC 2?




回答2:


Yes, you will need to build a custom memberShip provider



来源:https://stackoverflow.com/questions/6626172/aspnet-mvc3-can-i-use-my-user-roles-tables-to-handle-user-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!