获取windows当前的AD账号

 string UserAd = HttpContext.Current.User.Identity.Name;   //geqinggao\george

 string ad = UserAd.ToString().Trim().ToLower().Substring(10, (UserAd.Length - 10));  //george

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. –Martin Fowler
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/gerryge/p/george.html