Unknown error (0x8000500c)

  • Thread starter Thread starter sensanka
  • Start date Start date
S

sensanka

Guest
Hello All,

Below is the C# code which i am trying in Visual Studio.

PrincipalContext pc = new PrincipalContext(ContextType.Domain, "abc.domain.com");
GroupPrincipal gp = GroupPrincipal.FindByIdentity(pc, IdentityType.Name, "abc_abc_Config");

If i run the program as a LOCALSYSTEM ACCOUNT (NT Authority\system), i get the below Exception and Stack.

System.Runtime.InteropServices.COMException (0x8000500C): Unknown error (0x8000500c)
at System.DirectoryServices.PropertyValueCollection.PopulateList()
at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type p
rincipalType, Nullable`1 identityType, String identityValue, DateTime refDate)
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type princip
alType, IdentityType identityType, String identityValue)
at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, IdentityType id
entityType, String identityValue)

If I run the Program as any other Local Account, i don't get the exception and everything works fine.

The Problem actually started, due to below Action from my side .

This is simple Lab Setup, 1 Windows 2012 AD and multiple machines on that AD.

In the ActiveDirectory, I accessed the ADSI utility and connected to CN=Schema,CN=Configuration,DC=abc,DC=domain,DC=com

Went to the properties of this Container and Unchecked the READ Permission for "Authenticated Users" Group, to simulate a problem.

Now even after if check the READ Permission, I am not able to recover from the above Exception for LOCALSYSTEM ACCOUNT

Any suggestions or guidance what could have gone wrong?

Regards,

Senthil Kumar

Continue reading...
 
Back
Top