DirectoryEntry.NativeGuid Свойство

Определение

Возвращает GUID DirectoryEntryпоставщика.

public:
 property System::String ^ NativeGuid { System::String ^ get(); };
public string NativeGuid { get; }
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSNativeGuid")]
public string NativeGuid { get; }
member this.NativeGuid : string
[<System.ComponentModel.Browsable(false)>]
[<System.DirectoryServices.DSDescription("DSNativeGuid")>]
member this.NativeGuid : string
Public ReadOnly Property NativeGuid As String

Значение свойства

Структура Guid , представляющая GUID поставщика DirectoryEntry.

Атрибуты

Примеры

В следующем примере показано, NativeGuid как Guid и свойства DirectoryEntry класса. В этом примере возвращается указанный DirectoryEntry пользователем и отображается его Guid и NativeGuid свойства.

Dim myADSPath As [String] = "LDAP://onecity/CN=Users,
             DC=onecity,DC=corp,DC=fabrikam,DC=com"
Dim myDirectoryEntry As New DirectoryEntry(myADSPath)

' Display the Guid and NativeGuid.
Console.WriteLine("The GUID of the ADS object:" + myDirectoryEntry.Guid.ToString)
Console.WriteLine("The Native GUID of the ADS" + "object:" +
             myDirectoryEntry.NativeGuid)
String myADSPath = "LDAP://onecity/CN=Users,
             DC=onecity,DC=corp,DC=fabrikam,DC=com";
DirectoryEntry myDirectoryEntry=new DirectoryEntry(myADSPath);

// Display the Guid and NativeGuid.
Console.WriteLine("The GUID of the ADS object:"+
                  myDirectoryEntry.Guid);
Console.WriteLine("The Native GUID of the ADS"+
                  "object:"+myDirectoryEntry.NativeGuid);

Комментарии

Используйте свойство при привязке NativeGuid объекта в доменных службах Active Directory.

Замечание

Поставщик протокола LDAP возвращает глобальный уникальный идентификатор DirectoryEntry в другом формате, отличном от поставщиков Служб IIS, Novell NetWare Directory Server (NDS) и WinNT.

Применяется к

См. также раздел