We are developing our application using MS Visual Studio 2008 VB .Net.
We have to use Active Directory Server for authenticating the user logging into the application.
Does any one has code samples intergrating .Net and ADS?
We are developing our application using MS Visual Studio 2008 VB .Net.
We have to use Active Directory Server for authenticating the user logging into the application.
Does any one has code samples intergrating .Net and ADS?
There's the CodeProject articles on the topic:
and on MSDN in the System.DirectoryServices
documentation, there's
and then the two really good articles on new features in AD support with .NET 2.0 and 3.5:
Detailed explanation and code samples can be found here:
http://www.dotnetspider.com/resources/2137-Active-Directory-Au-entication-wi-Form-Based-Au.aspx
here:
http://www.dotnetspider.com/resources/17208-Authenticate-user-against-active-directory.aspx
and here:
Hope it helps.
Assuming you are going to put users into an Active Directory Group for authentication:
' Assume an Active Directory group exists named "MyApp Admins" with users in it.
If My.User.CurrentPrincipal.IsInRole("MyApp Admins") Then
' Do stuff
End If