与第三方DLL与IIS WCF服务的连接 [英] WCF service connection with third party dll with IIS

查看:394
本文介绍了与第三方DLL与IIS WCF服务的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与Windows 7,VS2010,SqlServer的2008年上班族。

I am working with Windows 7, VS2010, SqlServer 2008.

我的应用程序需要的数据形成一个第三方的DLL(从必须运行的另一个进程需要的数据在背景中)和处理数据和发送过来一个WCF服务的前端。

My application takes data form a third party dll (which takes data from another process that must be running in the background) and processes the data and send it over a WCF service to the front end.

应用程序已经完成,做什么它应该做的。现在,当我想分发和IIS运行它。我面临着一个奇怪的问题。该应用程序从DLL中获取数据,当我在IIS中运行它,它失败,并给出了一个错误,同时连接到该dll。

The application is done and does what it supposed to do. Now when I want to distribute it and Run it in IIS. I am facing a strange problem. The application get the data from a dll when I run it in IIS it fails and gives an error while connecting to the dll.

检索COM类工厂CLSID为
{} FCEC6861-5866-4F9E9A09-7CC868C30A8B失败组件由于以下
错误:80070005访问被拒绝。 (异常来自HRESULT:
0X80070005(E_ACCESSDENIED))。

Retrieving the COM class factory for component with CLSID {FCEC6861-5866-4F9E9A09-7CC868C30A8B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

经过一番研究,我发现要组件服务和内部DCOM配置更改DLL的安全性给大家。错误停止。

After some research I found out going to component service and inside DCOM config I change the security of the dll to everyone. The error stopped.

但现在我没有得到错误,但我不明白的时候它提供了数据的软件被关闭,如数据。但好的工作与我的ASP.net开发服务器。

But now I don't get the error but I don't get the data like when the software which provides the data is closed. But work ok with my ASP.net development server.

此外,我发现,当我以管理员模式运行Visual Studio我必须得运行管理模式的第三方数据软件

Also I found that when I run Visual Studio in administrator mode I must run the third party data software in administrative mode too.

该DLL引用不是在bin文件夹中自动复制,它把在OBJ文件夹中,我手动复制它,但它不工作。

The dll reference is not copied in bin folder automatically, it put in obj folder and I manually copied it but it does not work.

推荐答案

我觉得会发生什么事是,COM组件在相同的环境中调用方运行,它需要提升的权限来执行它的工作。

What I think happens is that the COM component is running in the same context as the caller and it needs elevated permissions to perform its job.

所以:


  • VS在管理模式,COM在管理模式,可行的,因为两者都具有全系统权限来执行他们的工作。

  • IIS下的应用程序池帐户(不知道这)运行,COM也将是该帐户下的,但它不是管理员,所以过低的权限正确地做这项工作。

我的故障排除的建议是让你的应用下改变运行是IIS应用程序池本地管理员。如果这样的作品好,恢复你的DCOM为默认的访问权限(前更改为每个人),然后再试一次。您也可以尝试运行在本地系统帐户下的应用程序池看个究竟。如果仍然有效,您确认这种行为是问题。

My troubleshooting suggestion would be to have the IIS application pool that your app is running under changed to be local admin. If that works OK, restore the access rights on your DCOM to the defaults (before changing to everyone) and try again. You might also try to run the app pool under the local system account to see what happens. If that still works, you have confirmed this behavior to be the problem.

这篇关于与第三方DLL与IIS WCF服务的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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