我想创建一个MVC应用程序,该应用程序使用用户用来登录到其PC的凭据,并使用这些凭据来验证用户是否使用LDAP位于特定域上,以及是否从活动目录中获取详细信息。
By using System.DirectoryServices
You can get user related info from local LDAP.
var ldapPath = "your-domain-ldap-path"
var directoryEntry = new DirectoryEntry(ldapPath, UserName, Password, AuthenticationTypes.Secure);
This should get you to the user.
System.Security.Principal.WindowsIdentity.GetCurrent()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.