自定义成员和角色数据库? [英] Custom Members and role database?

查看:101
本文介绍了自定义成员和角色数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新手在这里,我没有带做了很多会员的东西的asp.net。我想利用asp.net会员机制,一个新的应用我建立的,但我想保存在自己的数据库中的成员信息。我有哪些选择?我是否需要写一个自定义的成员资格提供?或做asp.net有一个标准的提供程序的SQL(与指定的表名和列名)?

Newbie here, I havn't done much membership stuff for asp.net. I am trying to take advantage of the asp.net membership mechanism for a new app I am building, but I wish to store the member information in my own database. what are my options? Do I need to write a custom membership provider? or does asp.net have a standard provider for sql (with specified tables and column names)?

快速编辑:每个成员登录使用他们的Windows身份验证,但我也需要存储有关他们额外的信息,如他们的部门,年龄,职级等

Quick edit: Each member is logged in using their windows authentication, but I also need to store extra information about them such as their department, age, rank etc.

推荐答案

您可能要考虑使用新的<一个href=\"http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx\"相对=nofollow>普遍成员提供商

You might want to consider using new Universal Membership Provider

成员资格提供程序是一个陡峭的学习曲线。如果你不熟悉的成员资格提供,请使用默认的,而不是实现自定义成员提供。

Membership Provider is a steep learning curve. If you are not familiar with Membership Provider, please use the default one rather than implementing custom membership provider.

然后使用用户表的用户ID为您存储用户相关信息的其他表的主键。

Then use the UserId of User table as primary key in other tables which you store user related information.

这篇关于自定义成员和角色数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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