Good afternoon. My first post with an MVC 4 authentication question.
For my current project, I have a requirement to allow logins against multiple user stores. Administrators need to be validated against an Active Directory store and regular users need to be validated through SQL Server.
My web.config file contains both providers one for AD and the other default provider that's installed by default.
<add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=xx;Integrated Security=SSPI" providerName="System.Data.SqlClient" />
<add name="ADService" connectionString="LDAP://ldapServer/" />
A user logs into the site and enters his/her username and password. The mvc site looks up the domain Active Directory to see if the users exists. If it does, the user is forwarded to the administrators page (ADMIN). If not, it looks up the users database (SQL Server, Oracle).
How can I do this? Is it possible to use SqlMembershipProvider AND ActiveDirectoryMembershipProvider at the same time. There is a similar question posted here but has no answers yet. https://stackoverflow.com/questions/20262066/custom-membershipprovider-combining-activedirectorymembershipprovider-and-sqlm
Thanks in advance.
Ceci