我正在 VSS 2010 、.Net 4.0 和 Widows 7(64 位)上构建应用程序。
我正在使用第三方组件来加密和解密密码。
我在我的应用程序中引用了第三个 paty dll 并编写了代码。
当我尝试在集成 VSS Web 服务器上运行时,出现以下错误,
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {B72DF070-28A4-11D3-BF19-009027438003} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at EncryptProject.HashString.hashstring(String password, String pwsalt)
但是当我将这些代码 dll 移至生产服务器时,它工作正常。
我在互联网上搜索并得到了一些建议将目标平台更改为x86,x64...
我尝试了所有可能的方法,但没有用。
如果有人能帮助我解决这个问题,那就太好了。
这样我就只能在本地系统中调试我的应用程序。
提前致谢,
问候..
最佳答案
- 您的服务器是 x86 机器吗?
- 这个第三部分 COM 服务器是否编译为 x86 ?
如果这些问题的答案是是,那么只需将代码编译为 x86 而不是 x64(这是最可能的原因),它应该可以工作。
关于.net - 检索 COM 类工厂,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7446179/