Domain.GetCurrentDomain Método

Definição

Obtém o objeto Domain para as credenciais do usuário atuais em vigor para o contexto de segurança sob a qual o aplicativo é executado.Gets the Domain object for the current user credentials in effect for the security context under which the application is running.

public:
 static System::DirectoryServices::ActiveDirectory::Domain ^ GetCurrentDomain();
public static System.DirectoryServices.ActiveDirectory.Domain GetCurrentDomain ();
static member GetCurrentDomain : unit -> System.DirectoryServices.ActiveDirectory.Domain
Public Shared Function GetCurrentDomain () As Domain

Retornos

Domain

O objeto Domain que representa o domínio para as credenciais do usuário atuais em vigor para o contexto de segurança sob a qual o aplicativo é executado.A Domain object that represents the domain for the specified user credentials in effect for the security context under which the application is running.

Exceções

Uma conexão para o contexto atual não pôde ser feita.A connection to the current context could not be made.

Comentários

GetCurrentDomain o método é determinado pelas credenciais de domínio sob as quais o aplicativo está sendo executado.GetCurrentDomain method is determined by the domain credentials under which the application is running. Para recuperar o Domain objeto que representa o domínio no qual o computador que está executando o aplicativo está associado, independentemente das credenciais associadas a esse aplicativo, use o GetComputerDomain método em vez disso.To retrieve the Domain object representing the domain to which the computer running the application is joined, regardless of the credentials associated with that application, use the GetComputerDomain method instead.

Consulte TambémSee Also

GetComputerDomain

Aplica-se a