Deploying .NET COM dll, getting error (0x80070002)

Posted by Brett on Stack Overflow See other posts from Stack Overflow or by Brett
Published on 2010-03-23T15:02:56Z Indexed on 2010/03/23 21:23 UTC
Read the original article Hit count: 357

Filed under:
|
|

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.

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.

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:

  • The deployment folder has adequate permissions.
  • We have confirmed that the folder the assembly in installed in has the correct permissions for all the necessary user accounts.
  • The Assembly is signed with a strong name, and was registered with regasm.exe C:_WebSites\LTMRender\LTMRender.dll /codebase /tlb:C:_WebSites\LTMRender\LTMRender.tlb. Regasm reported success.
  • The Assembly has the attribute and relevant GUID’s set correctly.

Any tips?

EDIT

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

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.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about com