为什么asp.net成员有一个用户表和成员表?成员、有一个、用户、asp

2023-09-04 02:08:12 作者:别低头,皇冠会掉

为什么他们分手了用户材料到2表?就像他们得到了aspnet_成员和aspnet_users。

Why do they split up the users stuff into 2 tables? Like they got aspnet_ membership and aspnet_users.

难道仅仅是因为会员的东西,他们拥有的是这么长时间?

Is it just because the membership stuff they have is so long?

推荐答案

这是从会员管理单独识别/认证管理。 大的用户表的实际身份信息库 - 例如,如果你想使用SQL来存储你的身份资料,这一切都在这里。但是你可能需要使用一些其他来源 - 说,活动目录 - 是你的身份信息库。您验证对这种身份和身份验证,而不是,但你仍然需要有某种方式加入到基于SQL的角色/会员数据的基于AD的身份数据。这就是小桌子进来 - 只需足够的信息来维护这些关系

It's to separate identity/authentication management from membership management. The "big" user table is the actual identity repository - e.g., if you want to use SQL to store your identity data, it all goes in here. But you may want to use some other source - say, Active Directory - to be your identity repository. You validate identity and authentication against that instead, but you still need to have some way to join the SQL-based role/membership data to the AD-based identity data. That's where the smaller table comes in - just enough info to maintain those relationships.