Search generating exception [Active Directory Recycle Bin] [DirectoryEntry]

Rikelme Gonçalves Carneiro 0 Pontos de reputação
2024-10-08T17:31:23.33+00:00

I'm trying to retrieve information about deleted objects in Active Directory. Typically, these objects are stored in the Active Directory recycle bin. I can perform searches using the DirectorySearcher class, but when I attempt to query the DirectoryEntry class using the same path from DirectorySearcher, I encounter exceptions for all fields.

String myADSPath = "LDAP://IP_SERVER/CN=HOSTNAME\0ADEL:GUID,CN=Deleted Objects,DC=adomain,DC=br";
DirectoryEntry myDirectoryEntry = new DirectoryEntry(myADSPath, username, password);
String test = myDirectoryEntry.Parent.Path;

imagem (40)

I can run the same query without any issues when it involves an active object. However, I'm encountering problems specifically with deleted objects. I would like to know if there are any alternative methods to investigate this issue. It's possible that there are permissions I might not have.

.NET
.NET
Tecnologias da Microsoft baseadas na estrutura de software do .NET.
25 perguntas
0 comentários Sem comentários
{count} votos

Sua resposta

As respostas podem ser marcadas como Respostas Aceitas pelo autor da pergunta, o que ajuda os usuários a saber a resposta que resolveu o problema do autor.