本文整理汇总了C#中System.DirectoryServices.ActiveDirectory.DirectoryContext.useServerBind方法的典型用法代码示例。如果您正苦于以下问题:C# DirectoryContext.useServerBind方法的具体用法?C# DirectoryContext.useServerBind怎么用?C# DirectoryContext.useServerBind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.DirectoryServices.ActiveDirectory.DirectoryContext
的用法示例。
在下文中一共展示了DirectoryContext.useServerBind方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDirectoryEntryInternal
internal static DirectoryEntry GetDirectoryEntryInternal(DirectoryContext context, string path)
{
return Bind(path, context.UserName, context.Password, context.useServerBind());
}
示例2: GetDirectoryEntry
internal static DirectoryEntry GetDirectoryEntry(DirectoryContext context, string dn)
{
string str = string.Concat("LDAP://", context.GetServerName(), "/");
/* NativeComInterfaces.IAdsPathname pathname = (NativeComInterfaces.IAdsPathname)(new NativeComInterfaces.Pathname());
pathname.EscapedMode = 2;
pathname.Set(dn, 4);
string str1 = pathname.Retrieve(7);
*/
string str1 = dn;
return DirectoryEntryManager.Bind(string.Concat(str, str1), context.UserName, context.Password, context.useServerBind());
}
示例3: GetDirectoryEntry
internal static DirectoryEntry GetDirectoryEntry(DirectoryContext context, string dn)
{
string tempBindingPrefix = "LDAP://" + context.GetServerName() + "/";
NativeComInterfaces.IAdsPathname pathCracker = (NativeComInterfaces.IAdsPathname)new NativeComInterfaces.Pathname();
pathCracker.EscapedMode = NativeComInterfaces.ADS_ESCAPEDMODE_ON;
pathCracker.Set(dn, NativeComInterfaces.ADS_SETTYPE_DN);
string escapedDN = pathCracker.Retrieve(NativeComInterfaces.ADS_FORMAT_X500_DN);
return Bind(tempBindingPrefix + escapedDN, context.UserName, context.Password, context.useServerBind());
}
示例4: GetDirectoryEntry
internal static DirectoryEntry GetDirectoryEntry(DirectoryContext context, string dn)
{
string str = "LDAP://" + context.GetServerName() + "/";
NativeComInterfaces.IAdsPathname pathname = (NativeComInterfaces.IAdsPathname) new NativeComInterfaces.Pathname();
pathname.EscapedMode = 2;
pathname.Set(dn, 4);
string str2 = pathname.Retrieve(7);
return Bind(str + str2, context.UserName, context.Password, context.useServerBind());
}