简体   繁体   English

IIS 64bit Com dll

[英]IIS 64bit Com dll

Hi I'm developing an app where i need to access a com DLL via a web service. 嗨,我正在开发一个应用程序,我需要通过Web服务访问一个com DLL。

I'm running IIS 7 on win 7 and developing using vs2010. 我在win 7上运行IIS 7并使用vs2010进行开发。

Everything works fine in the development environment but when I went to publish to IIS on my localhost to do some further testing I was getting the following error: 在开发环境中一切正常但是当我在本地主机上发布到IIS进行进一步测试时,我收到以下错误:

System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {29345FBB-4DE7-4838-9464-5A886B775677} failed due to the following error: 80040154. System.Runtime.InteropServices.COMException:由于以下错误,检索具有CLSID {29345FBB-4DE7-4838-9464-5A886B775677}的组件的COM类工厂失败:80040154。

I looked this up and found that If I changed my app pool settings to "Enable 32 Bit Applications" to true. 我查了一下,发现如果我将我的应用程序池设置更改为“启用32位应用程序”为true。 That this would get round the error, I did this and now I am getting the following error: 这将绕过错误,我做了这个,现在我收到以下错误:

Unable to cast COM object of type 'ComName.ComClassClass' to interface type 'ComName._ComClass'. 无法将“ComName.ComClassClass”类型的COM对象强制转换为接口类型“ComName._ComClass”。 This operation failed because the QueryInterface call on the COM component for the interface with IID '{003B251B-6F4E-42A5-8111-11DB41F1D14A}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). 此操作失败,因为对IID为“{003B251B-6F4E-42A5-8111-11DB41F1D14A}”的接口的COM组件的QueryInterface调用由于以下错误而失败:不支持此类接口(HRESULT异常:0x80004002(E_NOINTERFACE)) 。

Im completely lost as to where to look, Have googled it an can't seem to find an answer is there anyone that knows what is going on? 我完全迷失在哪里看,用Google搜索它似乎无法找到答案是否有人知道发生了什么?

COM dlls need to be registered on the IIS server. COM dll需要在IIS服务器上注册。 Install the software that installs that COM dll or do it yourself manually using regsvr32.exe "C:..\\yourdll.dll" 安装安装该COM dll的软件或使用regsvr32.exe“C:.. \\ yourdll.dll”自行手动完成


[Window Title] RegSvr32 [窗口标题] RegSvr32

[Content] [内容]

To register a module, you must provide a binary name. 要注册模块,您必须提供二进制名称。

Usage: regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname 用法:regsvr32 [/ u] [/ s] [/ n] [/ i [:cmdline]] dllname

/u - Unregister server / u - 取消注册服务器

/s - Silent; / s - 沉默; display no message boxes 不显示消息框

/i - Call DllInstall passing it an optional [cmdline]; / i - 调用DllInstall传递一个可选的[cmdline]; when used with /u calls dll uninstall 与/ u一起使用时调用dll uninstall

/n - do not call DllRegisterServer; / n - 不要调用DllRegisterServer; this option must be used with /i 此选项必须与/ i一起使用


If you think it is already registered then unregister it and re-register it, and maybe do a iisreset :) 如果你认为它已经注册,那么取消注册并重新注册,也许做一个iisreset :)

Example (assuming your dll is directly in C:\\ ): 示例(假设您的dll直接在C:\\中):

C:>regsvr32.exe /u thecomdll.dll C:> regsvr32.exe / u thecomdll.dll

C:>regsvr32.exe thecomdll.dll C:> regsvr32.exe thecomdll.dll

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM