调用COM方法时IIS Web服务上的灾难性故障 [英] Catastrophic failure on IIS Web Service when calling a COM method

查看:541
本文介绍了调用COM方法时IIS Web服务上的灾难性故障的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许是最糟糕的错误信息,人们可以看到。



我尝试在IIS 7.5上创建一个Web服务(WS)(我最初尝试过WCF服务但同样的故事)
WS使用成功注册的COM DLL,并提供COM安全权限。



当我使用Visual Studio开发服务器运行WSS一切都很好,我得到的结果请求。但是当我尝试部署WS到IIS,我最终与

  System.Runtime.InteropServices.COMException:灾难性失败

我的电脑有Windows Server 2008 R2 Standard,x64。
我必须强调:我开发(使用Visual Studio 2010 Ultimate),测试(使用Visual Studio开发服务器)并部署



我认为问题可能与 32-64位不兼容问题有关,因为我的COM支持32位。因此,我更改了应用程序池设置以启用32位应用程序,在Visual Studio中将平台目标更改为x86,重新部署了WS,但这些都没有帮助。



is:



WS如何在VS开发服务器上成功运行但在IIS上失败? p>

解决方案

这真的有助于咨询COM DLL的生产者。他们给出了一个清楚的DLL安装过程,我已经以某种方式省略。



故事的道德:虽然您的网络服务或网站在Visual Studio Development Server下运行成功,但这并不一定意味着您已配置COM DLL的所有设置



您可以开始检查以下问题:




  • 注册COM DLL

  • 如果您的DLL没有出现在dcomcnfg列表中,那么您可能没有使用dcomcnfg
  • 正确注册。
  • 检查您的IIS应用程序池设置

  • 您可能需要在web.config中模拟

  • 检查事件查看器。


  • 在我的例子中,我正在玩所有这些项目,但从未按正确的顺序播放。最后,从生产者的帮助已经到达,这是显示正确的路径。


    Maybe the worst type of error message that one can see. Does not mean anything, may be related to everything...

    I try to create a web service (WS) on IIS 7.5 (I have initially tried WCF services but same story) The WS uses a COM DLL which is successfully registered and the COM security permissions are given.

    When I run the WS using Visual Studio Development Server everything is fine, I get the results as requested. But when I try to deploy the WS to IIS, I end up with

    System.Runtime.InteropServices.COMException: Catastrophic failure
    

    My computer has Windows Server 2008 R2 Standard, x64. I have to emphasize: I develop (using Visual Studio 2010 Ultimate), test (using Visual Studio Development Server) and deploy (using IIS 7.5) on the same computer.

    I was thinking that the problem might be related to 32-64 bit incompatibilities, as my COM is supporting 32 bits. Therefore, I changed the application pool settings to enable 32 bit applications, changed the platform target to x86 in Visual Studio, redeployed the WS, none of these helped.

    My question is:

    How can a WS successfully run on VS Development Server but fail on IIS? What else shall I change in IIS settings?

    解决方案

    It really helps to consult the producer of the COM DLL. They have given a clear installation procedure for the DLL, that I have somehow omitted.

    Moral of the story: Although your web service or web site operates successfully under Visual Studio Development Server, this does not necessarily mean that you have configured all settings for the COM DLL correctly.

    You can start checking the following issues:

    • Register the COM DLL
    • Check configuration settings using dcomcnfg
    • If your DLL does not appear in dcomcnfg lists, then probably you did not register it correctly. Some registry editor entries are probably missing.
    • Check your IIS application pool settings
    • You may need to impersonate in web.config
    • Check the event viewer. It might include some important clues

    In my case, I was playing with all of these items, but never in the correct sequence. Finally the help from the producer has arrived which was showing the correct path.

    这篇关于调用COM方法时IIS Web服务上的灾难性故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆