开发者

Active Directory Server with .Net

开发者 https://www.devze.com 2022-12-10 21:32 出处:网络
We are developing our application using MS Visual Studio 200开发者_如何学运维8 VB .Net. We have to use Active Directory Server for authenticating the user logging into the application.

We are developing our application using MS Visual Studio 200开发者_如何学运维8 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:

  • Working with Active Directory from VB.NET
  • How to do almost anything with Active Directory

and on MSDN in the System.DirectoryServices documentation, there's

  • Quicklist of Visual Basic 2005 samples

and then the two really good articles on new features in AD support with .NET 2.0 and 3.5:

  • New Ways to Manage Active Directory in .NET 2.0
  • Managing Security Principals with .NET 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:

http://www.vbdotnetheaven.com/UploadFile/ankithakur/Login_Using_Active_Directory11172006011336AM/Login_Using_Active_Directory.aspx

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
0

精彩评论

暂无评论...
验证码 换一张
取 消