ASP.NET 2.0成员资格 [英] ASP.NET 2.0 Membership

查看:87
本文介绍了ASP.NET 2.0成员资格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我正在使用会员提供商,并通过此系统存储所有登录详细信息




但是,我需要添加可能随时间变化的其他字段

与用户相关。例如。 DOB,出生地等等。


最好的方法是什么?使用aspnet_Users表的

主键创建第二个表,并将其用作

我的新表中的外键?


我可以扩展提供者以获取这些新字段吗?如果是这样,我如何在新字段的情况下改变它?b / b

问候

Ray

Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time
that are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the
primary key of the aspnet_Users table and use this as a foreign key in
my new table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray

推荐答案

尝试使用配置文件。它们是会员的内置扩展

提供商。


-


Riki


" Ray Booysen" < RJ *********** @ rjb.za.net>在消息中写道

新闻:e6 ************* @ TK2MSFTNGP05.phx.gbl ...
Try using profiles. They are a built in extension for the membership
provider.

--

Riki

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e6*************@TK2MSFTNGP05.phx.gbl...
大家好

我正在使用会员提供商并通过此系统存储所有登录详细信息。

但是,我需要添加可能随时间变化的其他字段
与用户有关。例如。 DOB,出生地等等。

最好的方法是什么?使用aspnet_Users表的主键创建第二个表,并将其作为新的
表中的外键使用?

我是否可以扩展提供程序以获取这些新字段?如果是这样,我如何在新字段的情况下更改它?

问候
Ray
Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time that
are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the primary
key of the aspnet_Users table and use this as a foreign key in my new
table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray



谢谢,我来看看吧!


问候

Ray


Riki写道:
Thanks, I''ll take a look!

Regards
Ray

Riki wrote:
尝试使用个人资料。它们是会员
提供商的内置扩展。


Riki

Ray Booysen < RJ *********** @ rjb.za.net>在消息中写道
新闻:e6 ************* @ TK2MSFTNGP05.phx.gbl ...
Try using profiles. They are a built in extension for the membership
provider.

--

Riki

"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:e6*************@TK2MSFTNGP05.phx.gbl...
大家好

我正在使用会员提供商,并通过此系统存储所有登录详细信息。

但是,我需要添加可能随时间变化的其他字段
用户。例如。 DOB,出生地等等。

最好的方法是什么?使用aspnet_Users表的主键创建第二个表,并将其作为新的
表中的外键使用?

我是否可以扩展提供程序以获取这些新字段?如果是这样,我如何在新字段的情况下更改它?

问候
Ray
Hi all

I am using the membership provider and am storing all the login details
via this system.

However, I require to add additional fields that may change over time that
are related to the User. E.g. DOB, Place of birth and all that.

What is the best way to do this? Create a second table taking the primary
key of the aspnet_Users table and use this as a foreign key in my new
table?

Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?

Regards
Ray




On Tue,2006年5月2日10:59:33 +0100,Ray Booysen写道:
On Tue, 02 May 2006 10:59:33 +0100, Ray Booysen wrote:
但是,我需要添加可能会更改的其他字段随着时间的推移
与用户有关。例如。 DOB,出生地和所有这些。


不,这不是会员资格的内容。会员资格不是一个完整的用户

商店,它只是一种验证真实用户的方式。

最好的方法是什么?使用aspnet_Users表的
主键创建第二个表,并将其用作我的新表中的外键?


是的,这是一个很好的解决方案。

我可以扩展提供商以获取这些新字段吗?如果是这样,我如何在新字段的情况下更改它?
However, I require to add additional fields that may change over time
that are related to the User. E.g. DOB, Place of birth and all that.
No, that''s not what membership is about. Membership is not a full user
store, it''s merely a way to verify authentic users.
What is the best way to do this? Create a second table taking the
primary key of the aspnet_Users table and use this as a foreign key in
my new table?
Yes, that''s a good solution.
Can I extend the provider to take these new fields? If so, how do I
change it in case of new fields?




不,就像我说的,成员资格不是一般数据存储。您应该编写

您自己的例程来单独访问这些数据。试图将它绑定到

会员提供商总是令人头疼。



No, Like I said, Membership is not a general data store. You should write
your own routines to access this data seperately. Trying to tie it into
the membership provider is always a recipe for headaches.


这篇关于ASP.NET 2.0成员资格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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