【发布时间】:2009-11-06 07:15:07
【问题描述】:
我们正在使用 MS Visual Studio 2008 VB .Net 开发我们的应用程序。
我们必须使用 Active Directory Server 来验证登录到应用程序的用户。
有人有集成.Net和ADS的代码示例吗?
【问题讨论】:
标签: .net vb.net active-directory
我们正在使用 MS Visual Studio 2008 VB .Net 开发我们的应用程序。
我们必须使用 Active Directory Server 来验证登录到应用程序的用户。
有人有集成.Net和ADS的代码示例吗?
【问题讨论】:
标签: .net vb.net active-directory
有关于该主题的 CodeProject 文章:
在 System.DirectoryServices 文档中的 MSDN 上,有
然后是关于 .NET 2.0 和 3.5 的 AD 支持新功能的两篇非常好的文章:
【讨论】:
假设您要将用户放入 Active Directory 组进行身份验证:
' 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
【讨论】: