Mix Authentication (Active Directory + SQL Based)http://forums.asp.net/t/1810087.aspx/1?Mix+Authentication+Active+Directory+SQL+Based+Mon, 04 Jun 2012 02:22:19 -040018100875008639http://forums.asp.net/p/1810087/5008639.aspx/1?Mix+Authentication+Active+Directory+SQL+Based+Mix Authentication (Active Directory + SQL Based) <p>Hi,</p> <p>If i understand correctly, AD based authentication in ASP.net is possible simply by activating &quot;Basic Authentication&quot;. &nbsp;Please correct me if i am wrong on this or missing any piece of information.&nbsp;</p> <p>Now what we want to do is, we need to provide support to our cleint for the application we develop for him. &nbsp;but we can't asked them to create a dummy account for us in AD. &nbsp; So what we wanted is to have dual or MIX authentication.</p> <p>So that a support person can login into the system using same login screen, but his credentials will be verified by sql database and not Active directory.</p> <p>How we can do this ? &nbsp;Any workaround, tips, tricks.?</p> <p>Regards<br> Jiya.&nbsp;</p> <p></p> <p></p> 2012-06-02T08:29:53-04:005008809http://forums.asp.net/p/1810087/5008809.aspx/1?Re+Mix+Authentication+Active+Directory+SQL+Based+Re: Mix Authentication (Active Directory + SQL Based) <p>This is not supported by ASP.NET. To acheiev this there are a lot of hacky workarounds -- search in this forums and I'm sure you'll find 10 other posts that give 20 different ways to do it :)</p> <p>The way I'd suggest is to use forms authentication in the app and then have two different endpoints that the users can use to login depending on which type of authentication is required for that user.</p> 2012-06-02T13:09:04-04:005009635http://forums.asp.net/p/1810087/5009635.aspx/1?Re+Mix+Authentication+Active+Directory+SQL+Based+Re: Mix Authentication (Active Directory + SQL Based) <p>Hi Jiya,</p> <p>Just to add on Brock's suggestion.</p> <p>You can use membership provider (for forms authentication). ASP.NET provides built-in membership providers which can help validating users (username/password) against sql db or windows ActiveDirectory:</p> <p>#Managing Users by Using Membership<br> <a href="http://msdn.microsoft.com/en-us/library/tw292whz">http://msdn.microsoft.com/en-us/library/tw292whz</a></p> <p>#How To: Use Forms Authentication with Active Directory in ASP.NET 2.0<br> <a href="http://msdn.microsoft.com/en-us/library/ff650308.aspx">http://msdn.microsoft.com/en-us/library/ff650308.aspx</a></p> <p>And for your case, you can configure two (or more membership providers) in your ASP.NET web application. In the login.aspx page, you can programmtically select the proper membership provider to perform the account validation based on user's type (e.g. a dropdownlist on login page for user to select user type for logon). Here are some references discussing on the similar topic:</p> <p>#Role Management bind users to diffrerent applications<br> <a href="http://forums.asp.net/p/1796111/4949751.aspx/">http://forums.asp.net/p/1796111/4949751.aspx/</a></p> <p>#Using two Membership Providers for ASP.NET logins<br> <a href="http://www.stevideter.com/2008/03/20/using-two-membership-providers-for-aspnet-logins/">http://www.stevideter.com/2008/03/20/using-two-membership-providers-for-aspnet-logins/</a></p> <p>&nbsp;</p> 2012-06-04T02:22:19-04:00