views:

240

answers:

3

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?

+4  A: 

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:

marc_s
+2  A: 

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
HardCode