.Net Core Docker无法加载DLL'activeds.dll'

时间:2019-03-28 15:30:38

标签: c# docker asp.net-core .net-core

我有一个在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容器?

0 个答案:

没有答案