我可以使用 ASP.NET 会员资格来构建自定义帐户吗?
你好 我是 ASP.net 的新手,我看到了看起来很有趣的会员功能,但它有一些用于注册的字段和两个用于登录的字段,这是大多数需要的,我的情况是,我想自定义它,想要获取用户通行证从自定义表中,想要从此登录表中获取级别或名称,并希望将它们存储在会话等中,因为该应用程序适用于具有层次结构的组织。
请告诉我,我应该使用会员资格吗
Hi
I am new to ASP.net, i have seen the membership feature which looks quite interesting, but it has some fields for register and two fields for login as mostly required, my case is, i want to customize it, want to fetch user pass from custom table, want to fetch levels or designations from this login table, and want to store them in session etc, as this app is for an organization having hierarichal structure.
Please let me know, should i use membership
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您绝对可以使用会员资格,并以内置功能为基础。
检查 aspnet_Profiles 表。自定义字段可以放置在其中。您想要查找有关 asp.net 会员资料的详细信息。
这是一个关于会员资格的很好的链接.
也有帮助:
SQL 表配置文件提供程序
Yes you can absolutely use membership, and build upon the built in functionality.
Check aspnet_Profiles table. Custom fields can be placed within there. You want to look up details about asp.net membership profiles.
This is a good link regarding membership.
Also helpful:
SQL Table Profile Provider
ASP.Net 角色和成员资格提供程序提供了一个用于执行常见身份验证和授权任务的框架。有许多可用的标准实现,例如 SQLMembershipProvider。任何此类实现都会对用户数据的存储和检索做出一些假设。例如,SQL 会员资格提供程序使用具有特定表的 SQL 存储来存储用户数据。
如果默认实现不能满足您的需求,您可以自由编写自己的会员提供程序。与任何其他自定义实现相比,使用成员资格提供程序的优点之一是 ASP.Net 提供了许多控件,可以使此类提供程序的使用变得非常简单和直观。
ASP.Net Role and Membership provider provides a framework for doing common Authentication and Authorization tasks. There are many standard implementations available such as SQLMembershipProvider. Any such implementation makes some assumption about the storage and retrieval of user data. For example SQL membership provider uses the SQL storage with specific tables to store user data.
You are free to write your own membership providers if the default implementation does not suffice your needs. One of the the advantage of using Membership provider over any other custom implementation is that ASP.Net provides a host of controls that can make using of such providers really easy and intuitive.