如何使用MySql数据库在ASP中实现角色和成员资格? [英] How to achieve Roles and Membership in ASP with MySql database?

查看:76
本文介绍了如何使用MySql数据库在ASP中实现角色和成员资格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序(ASP.Net& C#).我正在使用MySql数据库.创建登录控件时遇到问题.我有Admin&用户作为登录"中的两个角色.我认为我无法使用ASP角色和成员资格选项,因为MySql将不支持此功能.请详细建议如何使用MySql数据库在我的应用程序中发展这种角色和成员资格?

提前感谢..

I have one web application(ASP.Net & C#). I am using MySql database. I am facing problem while creating Login control. I have Admin & User as two roles in Login. I think I can't use ASP roles and Membership option as MySql will not support for this. please suggest in detail how to develop this roles and membership in my application with MySql database?

Thanks in advance..

推荐答案

您好,

您实际上可以将角色和成员资格提供程序与MySql数据库一起使用.您需要为.NET使用Mysqlconnector.请在下面找到有关操作的链接.

Hi,

You can actually use Roles and Membership provider with MySql database. You need to use Mysqlconnector for .NET. Please find below  a link on how to do it.

http://blog.nolanbailey.com/2008/03/08/mysql-aspnet-membership-and-role-provider/194

If you dont want to use .NETconnector then, you need to have a master table with all the roles and another ampping table for userid and roleid and manage it that way.


这篇关于如何使用MySql数据库在ASP中实现角色和成员资格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆