c# - .Net Core Docker 无法加载 DLL 'activeds.dll'
问题描述
我有一个在 IISExpress 上运行良好的 ASP.Net Core 应用程序。
我对 Docker 完全陌生,所以当我将 Docker 支持添加到项目并运行它时,这部分会阻塞:
DirectoryEntry processEntry = new DirectoryEntry("LDAP://MyLdap", user, password);
processEntry.Options.Referral = ReferralChasingOption.Subordinate;
DirectorySearcher searcher = new DirectorySearcher(processEntry);
出现错误:
DllNotFoundException: Unable to load DLL 'activeds.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
我认为这是因为 Docker 看不到 dll,所以我在 Dockerfile 中添加了以下内容:
COPY ["C:/Windows/System32/activeds.dll","activeds.dll"]
但这似乎并没有改善,如何使 dll 可用于 Docker 容器?
解决方案
推荐阅读
- javascript - 当我们在下拉列表中选择数据时,响应式数据表不起作用
- amazon-web-services - AWS 上的 Spring Boot Thymeleaf Docker 映像:Whitelabel 错误页面 404
- netlogo - 问海龟 - 代理集的排序
- firebase - 如何在flutter中使用uid从firebase实时数据库中获取用户信息以及如何在我的用户表中添加uid
- java - 无法从 JTextField 中检索文本
- html - 如何在使用 yattag 时动态创建属性?
- android - 对从回收器视图到片段的共享转换没有影响
- mongodb - mongo客户端在main函数中设置,其他模块函数接收nil值
- angular - 如何在 Angular 中测试 cdkConnectedOverlay
- python - 在公共索引上连接两个数据帧,有没有更有效的方法来做到这一点?