Search code examples
asp.netmembershipsqlmembershipprovideractivedirectorymembership

Using SqlMembershipProvider when ActiveDirectoryProvider fails to log a user in


I have a requirement to allow access to an app with users being authenticated by AD. Sadly, not all of the users who can access the app will have been authenticated this way so I need to provide a mechanism whereby if a user arrives as the site their authentication is checked using AD and if it fails, they are handed off to a login page that will attempt to authenticate them using the SqlMembershipProvider.

So, to my questions:

  1. Is it possible to do this?
  2. If it is, how do I go about configuring it?
  3. (bonus question) If I want to use profiles, can both membership providers share one set of profile tables (stored in SQL)?

Thanks in anticipation.

-- Stuart


Solution

  • These links may show you the way depending on requirements and implementation details:

    How to Change Membership provider during runtime

    Multiple membership/role providers