摘要: Table of ContentsIntroductionBackgroundPoints of concern: security & impersonationRunning code in batch processesMethod parmetersNotes for using System.DirectoryServices.DirectoryEntryTarget specific domain controllers or credentialsManaging local accounts with DirectoryEntryManaging local group 阅读全文
posted @ 2011-11-18 11:15 与时俱进 阅读(889) 评论(0) 推荐(0) 编辑
摘要: public static class DomainInformation { #region Constants //static string[] usersLdapPath = @"LDAP://zzzzzz.com/OU=xxxxxx,DC=yyyyyy,DC=com"; static string usersLdapPath = System.Configuration.ConfigurationManager.AppSettings["LDAPConnectionString"].ToString() ; const string adLog 阅读全文
posted @ 2011-11-18 10:52 与时俱进 阅读(591) 评论(0) 推荐(0) 编辑
摘要: 1.在IIS中将访问方式更改为不允许匿名访问2.在Web.config中将验证方式更改为 <identity impersonate="true"/> <authentication mode="Windows" />3.在源代码中使用string username= Security.Principal.WindowsIdentity.GetCurrent().Namestring[] info = username.Split(new char[1] { '\\' }, StringSplitOptions.R 阅读全文
posted @ 2011-11-18 10:47 与时俱进 阅读(761) 评论(0) 推荐(0) 编辑
友情链接:同里老宅院民居客栈