• 首页

  • 归档
M i c h a e l 的 博 客
M i c h a e l 的 博 客

Michael

获取中...

12
11
.net core

.net core设置AD登陆验证

发表于 2020-12-11 • .net core 权限 • 被 13 人看爆

.net core设置AD登陆验证

安装nuget包,using System.DirectoryServices

        public bool TryADAuthenticate(string path, string userName, string password)
        {
            bool isLogin = false;
            try
            {
                DirectoryEntry entry = new DirectoryEntry(path, userName, password);
                entry.RefreshCache();
                isLogin = true;
            }
            catch
            {
                isLogin = false;
            }
            return isLogin;
        }
分享到:
.net core 自定义jwt验证
win10 家庭版远程桌面CredSSP加密报错
  • 文章目录
  • 站点概览
Michael

帅哥Michael

Crowded accidentaly across not anymore

Email RSS
看爆 Top5
  • async + await + promise 301次看爆
  • .net core AWS S3文件存储桶操作 272次看爆
  • ubuntu docker 安装 264次看爆
  • .net core部署环境 236次看爆
  • 常用sql server语句 221次看爆

Copyright © 2021 Michael · 鄂ICP备19024529号

Proudly published with Halo · Theme by fyang · 站点地图