Is there a way to use only forms authentication with multiple membership providers? For example, a user would enter their username and password this would attempt to authenticate with, say, the SQL membership provider, if that fails then a different membership provider would be used.

I have tried something like this to switch the provider being used but this does not work, I know I can authenticate with the windows provider but in this case strictly using forms is preferred.

 iisSettings.FormsClaimsAuthenticationProvider.MembershipProvider = "admembers";
 bool status = SPClaimsUtility.AuthenticateFormsUser(Context.Request.UrlReferrer,

1 Answer 1


That's only possible if you can modify the code of your membership provider and have it query all the possible user sources.

Since you can only use one membership provider per web application/zone, you must own the code of your membership provider to achieve a multi-source authentication process.

If you rely on an existing Microsoft-provided membership provider (such as the AD provider or the ASP.NET SQL provider) for instance, you can only authenticate your users against the user repositories those membership providers were designed to work with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.