DirectoryEntry.NativeGuid Propiedad

Definición

Obtiene el GUID del objeto DirectoryEntry tal y como lo devolvió el proveedor.

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

Valor de propiedad

Estructura Guid que representa el GUID del objeto DirectoryEntry, tal y como lo devolvió el proveedor.

Atributos

Ejemplos

En el ejemplo siguiente se muestran las Guid propiedades y NativeGuid de la DirectoryEntry clase . En este ejemplo se obtiene el usuario especificado DirectoryEntry y se muestran sus Guid propiedades y 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);  
String^ myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  
DirectoryEntry^ myDirectoryEntry = gcnew DirectoryEntry(myADSPath);  

// Display the Guid and NativeGuid.  
Console::WriteLine("The GUID of the ADS object: {0}", myDirectoryEntry->Guid));  
Console::WriteLine("The Native GUID of the ADS object: {0}",  
                   myDirectoryEntry->NativeGuid);  

Comentarios

Utilice la NativeGuid propiedad al enlazar un objeto en Servicios de dominio de Active Directory.

Nota:

El proveedor Lightweight Directory Access Protocol (LDAP) devuelve el identificador único global de un DirectoryEntry en un formato diferente al de Internet Information Services (IIS), Novell NetWare Directory Server (NDS) y proveedores winNT.

Se aplica a

Consulte también