简体   繁体   English

在ASP.NET中使用C ++ DLL-异常:无法加载文件或程序集

[英]Using c++ dll in asp.net - Exception:Could not load file or assembly

I am using a already developed C++ dll in my asp.net code to make compression/decompression of the data. 我在asp.net代码中使用已经开发的C ++ dll进行数据压缩/解压缩。 It works well on my developer machine and some other machines too. 它在我的开发人员机器和其他一些机器上也能很好地工作。 I have a client machine which is fresh(No fancy installation of various tools) and When it tries to call that dll it generates an exception. 我有一台新的客户机(没有花哨的安装各种工具),当它尝试调用该dll时会生成异常。

Exception: Could not load file or assembly 'dllcode, Version=1.0.5754.25819, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. 例外: Could not load file or assembly 'dllcode, Version=1.0.5754.25819, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Could not load file or assembly 'dllcode, Version=1.0.5754.25819, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I would like to know that which dependencies are missing on Client fresh machine? 我想知道客户端新鲜机器上缺少哪些依赖项?

Note: I am trying to call C++ dll in a windows service which is having asp.net 4.0 framework. 注意:我正在尝试在具有asp.net 4.0框架的Windows服务中调用C ++ dll。 This call is executing perfectly on my developer machine but generates above exception on my client machine.I do not have deep knowledge about c++ library and it's dll. 该调用在我的开发人员机器上执行完美,但是在我的客户端机器上生成了上述异常。我对c ++库及其dll没有深入的了解。 From basic troubleshooting I tried to install various combinations of "microsoft visual c++ 2010 runtime" but it did not help. 从基本的疑难解答中,我尝试安装“ Microsoft Visual C ++ 2010运行时”的各种组合,但没有帮助。

Update : Somehow I find source code of this C++ dll and now I am trying to check if I can build this dll any version specific. 更新 :不知何故我找到了这个C ++ dll的源代码,现在我试图检查是否可以构建任何特定版本的dll。

I got this resolved. 我解决了。 What I did is, I had to create separate setups(32-Bit & 64-Bit). 我要做的是,我必须创建单独的设置(32位和64位)。 Also VC++ run time was needed on server. 服务器上还需要VC ++运行时。 So I installed them and it worked. 因此,我安装了它们,并成功了。 Hope this help to any one if he faces the same issue. 如果他面临同样的问题,希望对任何人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法从 .Net 加载项加载文件或程序集 C++ DLL - Could not load file or assembly C++ DLL from a .Net add-in 使用C ++和嵌入式Mono调用C#DLL时无法加载汇编系统 - Could not load assembly System when using C++ and embedded mono to call to C# DLL asp.net mvc(使用来自 HRESULT 的 C++ 异常的外部 dll:0x8007007E) - asp.net mvc (use external dll of c++ Exception from HRESULT: 0x8007007E ) 无法从C ++包装器在MS测试中加载文件或程序集“ log4net” - Could not load file or assembly 'log4net' in MS test from a c++ wrapper 无法从 CLI/C++ 控制台应用程序加载文件或程序集 log4net - Could not load file or assembly log4net from CLI/C++ console aplication 链接到asp.net c#应用程序时C ++ dll无法写入文件 - C++ dll fails to write to file when linked to asp.net c# application 在引用C ++ dll的C#ASP.NET Web服务运行时出现“找不到指定的模块”错误 - “The specified module could not be found” error when running C# ASP.NET web service referring C++ dll 64位进程中的AnyCPU C#DLL无法引用64位C ++ DLL(提供错误:无法加载文件或程序集) - AnyCPU C# DLL in 64bit process is unable to refer 64 bit C++ DLL(Giving error: Could not load file or assembly) 想要在带有dll的asp.net中使用c ++库 - want to use c++ library in asp.net with dll 无法在python中加载c ++ DLL - could not load c++ DLL in python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM