Docker not allowing use of System.DirectoryServices.AccountManagement

1

My application keeps crashing

        // domain connection
        PrincipalContext LDAPDomain = new PrincipalContext(ContextType.Domain, LDAP_DOMAIN);

        // checking existance of user
        UserPrincipal user = UserPrincipal.FindByIdentity(LDAPDomain, username);

The error message says

DllNotFoundException: Unable to load DLL 'activeds.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)

The code works fine when running in IIS but in Docker, I get this crash and I am not sure how to resolve it.

I've done the following

docker cp C:\Windows\System32\activeds.dll :/C:/Windows/System32

In build Events in visual Studio, (Pre-Build)

XCOPY /Y "C:\Windows\System32\activeds.dll" "$(TargetDir)"

REGSVR32 C:\Windows\System32\activeds.dll (Console for Docker)

asp.net
docker
asp.net-core
asked on Stack Overflow Mar 9, 2020 by software is fun • edited Mar 9, 2020 by software is fun

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0