是否可以在ASP.NET中使用2个成员资格提供程序?

时间:2021-10-05 02:59:33

I have a website and needs to use the users base from a users database (SQL Server, Oracle, etc) and from a NT user database (computer or domain) for security/authentication of the site.

我有一个网站,需要使用用户数据库(SQL Server,Oracle等)和NT用户数据库(计算机或域)的用户群来进行网站的安全/身份验证。

  1. A user logs into the site and enters his/her username and password.
  2. 用户登录该站点并输入他/她的用户名和密码。

  3. The site looks up to the users database (SQL Server, Oracle, etc.) if the user exists.
  4. 如果用户存在,该站点将查找用户数据库(SQL Server,Oracle等)。

  5. If not, the site looks up to the domain (Active Directory) if the user exists.
  6. 如果不存在,则站点将查找域(Active Directory)(如果用户存在)。

Is it possible to use SqlMembershipProvider AND ActiveDirectoryMembershipProvider at the same time?

是否可以同时使用SqlMembershipProvider和ActiveDirectoryMembershipProvider?

1 个解决方案

#1


Yes it is possible.

对的,这是可能的。

Just add both MembershipProviders to your Web.config and specify a defaultMembershipProvider afaicr

只需将两个MembershipProviders添加到您的Web.config并指定defaultMembershipProvider afaicr

#1


Yes it is possible.

对的,这是可能的。

Just add both MembershipProviders to your Web.config and specify a defaultMembershipProvider afaicr

只需将两个MembershipProviders添加到您的Web.config并指定defaultMembershipProvider afaicr