asp.net - Docker 不允许使用 System.DirectoryServices.AccountManagement
问题描述
我的应用程序不断崩溃
// domain connection
PrincipalContext LDAPDomain = new PrincipalContext(ContextType.Domain, LDAP_DOMAIN);
// checking existance of user
UserPrincipal user = UserPrincipal.FindByIdentity(LDAPDomain, username);
错误消息说
DllNotFoundException: Unable to load DLL 'activeds.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
该代码在 IIS 中运行时运行良好,但在 Docker 中,我遇到了这个崩溃,我不知道如何解决它。
我做了以下
docker cp C:\Windows\System32\activeds.dll :/C:/Windows/System32
在 Visual Studio 中的构建事件中,(预构建)
XCOPY /Y "C:\Windows\System32\activeds.dll" "$(TargetDir)"
REGSVR32 C:\Windows\System32\activeds.dll(Docker 控制台)
解决方案
推荐阅读
- compiler-errors - 置换迭代器的推力擦除不起作用
- json - 如何从python3中的json文件中检索所有“名称”和“id”
- javascript - 打印出 Gibberish PDF 文件。角 6
- spring-boot - AOuth2 授权服务器未在给定数据库中插入令牌
- node.js - verdaccio 安装成功,但包只下载到 verdaccio 的存储中
- python - 基于列中的约束处理pandas数据帧中的聚合
- python - Keras 函数式 API 多输入模型
- c++ - 使用在另一个 .dll 中定义的方法
- html - 高度 550px 的视差图像宽度
- arrays - 从数组中检索数据,从 Laravel 中的特定第 n 项开始