How do I setup a Membership Provider in my existing database using ASP.NET MVC?

醉酒当歌 提交于 2019-11-28 19:12:35

Check out this step by step blog on how to set up Membership provider in your asp.net mvc project. The sdk tool you need to get your database ready is aspnet_regsql.exe, you don't need to create a separate database to do that ( a lot of people think they have to provide a separate aspnet.db), you can run the command on your existing database, and it will create the tables, views, and stored procedures to handle the membership provider for you.

However, should I be using this in my own project? What do I need to get my existing database ready if so? If not, how do I learn what I need to do to implement a membership provider?

The benefit to use the default provider (SqlMembership provider) is to save yourself a lot of time. It involves a lot of work to design a complete membership and role provider.

Edit [2014-06-19] Asp.Net Identity Framework is Microsoft new recommendation to manage user sand permissions.

Check out this link: https://github.com/TroyGoode/MembershipStarterKit

Most of the work is already done for you. Just download the sample project and run the aspnet_regsql.exe against your database.

griegs

check out my answer in this post;

membership

If you want to keep the membership provider that .Net creates for you then you can copy all the tables etc to another sql database and point the provider at it via the config file.

Post a comment if you need more than this.

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