部署.NET COM DLL,收到错误(0x80070002) [英] Deploying .NET COM dll, getting error (0x80070002)

查看:317
本文介绍了部署.NET COM DLL,收到错误(0x80070002)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET COM组件,我试图部署到Web服务器(IIS 6 2003胜)。我们已经成功地部署了本次大会,以我们的测试环境,但生产环境中是行不通的。

I have a .NET COM assembly I am attempting to deploy to a web server (IIS 6 Win 2003). We have successfully deployed this assembly to our test environment, but the production environment is not working.

该组件是被称为从传统的ASP页面。每当该页面试图初始化设置LTMRender =的CreateObject(LTMRender.Render),我得到一个错误错误类型的组件:(0x80070002)

The assembly is being called from a classic ASP page. Every time that page tries to initialize the assembly with "Set LTMRender = CreateObject("LTMRender.Render")", I get an error "Error Type:, (0x80070002)".

似乎这个错误指示权限被拒绝,或文件未找到类型的问题。

This error seems to indicate a permission denied, or file not found type problem.

我创建了一个测试程序,以查看是否装配工程网页之外。 .exe文件初始化组件,然后将调用设计失败从而导致产生一个日志文件汇编。它的工作原理,如果我运行在同一个文件夹中的程序集.exe文件,但如果我跑在其他地方失败。

I created a test app to see if the assembly works outside of the web page. The .exe initializes the assembly, and then makes a call designed to fail which in turn causes the assembly to produce a log file. It works if I run the .exe in the same folder as the assembly, but fails if I run it elsewhere.

由于某些原因,该组件是不是从外面的文件夹进行访问。

For some reason, the assembly is not accessible from outside it’s folder.

我不明白,为什么这是不行的。事情我已经证实:

I can’t figure out why this won’t work. Things I have confirmed:

  • 在部署文件夹有足够的权限。
  • 我们已经证实,在文件夹中安装了所有必要的用户帐户正确的权限集。
  • 大会用强名称进行签名,并注册regasm.exe C:_WebSites \ LTMRender \ LTMRender.dll / codeBase的/tlb:C:_WebSites\LTMRender\LTMRender.tlb。 Regasm报道的成功。
  • 在大会具有的属性,以及相关的GUID设置正确。

任何提示?

修改

我们的Filemon撞上了我的testapp.exe,似乎表明问题是什么。当testapp.exe运行在D:_websites \ DocWebV2 \或D:_websites \ DocWebV2 \ LTMRender \文件夹中,它成功和Filemon的是显示D:_websites \ DocWebV2 \ LTMRender \ pinPDF.dll成功

We ran filemon against my testapp.exe and it seems to have indicated what the problem is. When testapp.exe runs in D:_websites\DocWebV2\ or D:_websites\DocWebV2\ LTMRender\ folder, it succeeds and filemon is showing D:_websites\DocWebV2\LTMRender\pinPDF.dll SUCCESS

如果我跑我在D testapp.exe:_websites \ DocWebV2 \客户 - 在我的ASP网页运行,它显示了D:_websites \ DocWebV2 \ pinPDF.dll找不到名称,然后D:_websites \ DocWebV2 \ pinPDF \ pinPDF.dll找不到文件

If I run my testapp.exe in the D:_websites\DocWebV2\Client – where my asp pages run, it shows D:_websites\DocWebV2\pinPDF.dll NAME NOT FOUND and then D:_websites\DocWebV2\pinPDF\pinPDF.dll FILE NOT FOUND

我不知道为什么它不看在正确的文件夹,如果它只是这个特定的文件夹下。

I’m not sure why it is not looking in the correct folder if it’s under this particular folder only.

推荐答案

如果是文件未找到,没有权限问题。该7表示Windows错误,2 ERROR_FILE_NOT_FOUND。与COM有形成分通常的问题是Windows或在CLR未能找到相关的DLL。但是,这应该产生一个不同的错误code。寻找您的源$ C ​​$ C麻烦,试图打开文件,而无需使用该文件的全路径名。工作目录将是您的服务器上的不同。要解决这个问题最好的办法是使用调试器。

If is File Not Found, not a permission problem. The 7 indicates a Windows error, 2 is ERROR_FILE_NOT_FOUND. The usual trouble with COM visible components is either Windows or the CLR not being able to find dependent DLLs. But that should generate a different error code. Look for trouble in your source code, trying to open files without using the full path name of the file. The working directory will be different on your server. Best way to solve this is to use a debugger.

这篇关于部署.NET COM DLL,收到错误(0x80070002)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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