Solved

COM Interop Error

Posted on 2004-04-28
15
899 Views
Last Modified: 2013-11-25
Experts,
I have an ASP.NET web application that uses a COM object,using comInterop, and I began getting the following error: "ClassFactory cannot supply requested class"

This works on my machine and one other machine. However, when I deploy it to certain test server, I get "ClassFactory cannot supply requested class".

I have done the following so far:
unregistered/ and re- registered the dll
Compared the guids associed with the ProgID on my machine and the test server's registry.
Made sure that the registry keys were assessible Everyone.
Did A file compare between the dll and the interop.dll  - and they are identical

Some details that might be helpful:
1) This began when the VB6 COM object was updated.
2) I Used the IDE to generate the interop.dll
3)There are items in the registry that were probally created during development of the dll:
located here:
HKEY_CLASSES_ROOT\TypeLib\{10EB243F-6192-484A-9946-8D734C613983}\1.0\FLAGS
HKEY_CLASSES_ROOT\TypeLib\{10EB243F-6192-484A-9946-8D734C613983}\1.0\HELPDIR
HKEY_CLASSES_ROOT\TypeLib\{10EB243F-6192-484A-9946-8D734C613983}\1.0\0\win32

The last key listed refrebces a file that no longer exisits.

also, {10EB243F-6192-484A-9946-8D734C613983} is the value of the following registry key:
HKEY_CLASSES_ROOT\Interface\{97F0D6AA-2FCB-453F-81CE-481AA3833D76}\TypeLib

Any help would be appreciated.
0
Comment
Question by:BChan
  • 7
  • 4
  • 3
  • +1
15 Comments
 
LVL 10

Assisted Solution

by:GoodJun
GoodJun earned 100 total points
ID: 10943339
I think you may got a mismatch interop.dll and the com dll when you update the com dll. You may try in your source code, remove the interop.dll for previous com dll, reference to the new com dll (it will asks you to generate the interop.dll). Then try it out. When the com dll is updated, the interop.dll created by the vs.net IDE may not update accordingly.
0
 
LVL 4

Author Comment

by:BChan
ID: 10943484
GoodJun,
Thanks for responding. I tried this with no success.
My confusion stems that it works on some machines and not others. I am hoping that it is a configuration problem on the machine where the error occurs, but I would like to track it down so I can solve it if it arisses. Additionally, This is where we do the majority of our deployment for testing.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10943555
What kind of COM object are you using (third party, home-cooked, etc.)?

Bob
0
 
LVL 4

Author Comment

by:BChan
ID: 10943681
Bob,
it is a home-cooked,  vb6 object.

Brian
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10943720
Does the test server have the VB runtime installed?
0
 
LVL 4

Author Comment

by:BChan
ID: 10943751
dfiala13,
I am not sure. but the dll used to work, and has been for many months. it Just stopped today, when I introduced a new version of our dll. the version number on the dll DID change.  

I can access the same dll in clasic .asp pages via Server.CreateObject.
0
 
LVL 12

Assisted Solution

by:dfiala13
dfiala13 earned 200 total points
ID: 10943793
If you can access it via ASP that means you have the runtime installed, but it does point to a problem with your InterOp dll.

Of course, that is working on other machines and you are sure that the COM dlls are equivalent on all machines.

Is the COM dll dependent on another COM dll that is possibly out of date or different from the other version?

Are the OS versions different on the machines?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 4

Author Comment

by:BChan
ID: 10943843
dfiala13
>> Is the COM dll dependent on another COM dll that is possibly out of date or different from the other version?
the com object is not dependant on any other objects that I am aware of. It does use obtain references to the asp/ASP.NET intrinsic objects (Request, Session ).  

>> Are the OS versions different on the machines?
I have the application working on an XP and a Windows 2000 Professional box. The Machine that the error occurs on is a Windows 2000 Server.

Brian
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10943948
Is it a domain server?
0
 
LVL 4

Author Comment

by:BChan
ID: 10944093
It is not a domain server.
0
 
LVL 12

Expert Comment

by:dfiala13
ID: 10945411
OK,
well, this is a long shot, but everything I've been able to find suggests this is a problem with the Window's Scripting Host.

Make sure the server has the latest version installed.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10948389
What are the project references and components that are pertinent (ADO, MSComm, etc.)?

Bob
0
 
LVL 4

Author Comment

by:BChan
ID: 10953791
Sorry for the delay. I am working from home today.

dfiala13,
I will need to test this out tommorow when I am in the office.

Bob,
The Refrences in the project are:
COM + Admin Type Library
COM + Services Type Lib Library
Microsoft Active Server Pages Objects
OLE Automation
VB Objects and procedures
VB Objects runtime Objects and procedures
VB For Applications

Brian
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 200 total points
ID: 10953937
I think that you have to concern yourself with these dependencies:

COM + Admin Type Library
COM + Services Type Lib Library
Microsoft Active Server Pages Objects

How are you interfacing with these?  Do you have Interop libraries for these?  Are you using interface libraries in COM?

Bob
0
 
LVL 4

Author Comment

by:BChan
ID: 10955477
Guys, I have found my solution. it was related to somethng That  I did not mention, because I did not realise that it was significant (though I should have .) Let me now layout what happened before this started.

I created a deployment package for my web app. I deployed it to the machine in question. However, the vb6 dll I deployed was version 1.6.33 BUT my interop.dll was generated using 1.6.34. I got a nasty error that the class ID was incorrect or did not exisit.

To make sure that this was the problem, I tracked down version 1.6.34 and upgraded the dll. Vola! it worked. I made changes to my deployment package, uninstalled the app and re-installed it on the server.

The reinstall yeilded the problem we are discussing here.

After doing the following, I stopped getting the error.

1) downgrade  the dll to 1.6.33  and un-register it.
2) upgrade the dll to 1.6.34  and re-register it.
3) Kill the aspnet_wp.dll
I should mention that this was the first time I had killed aspnet_wp.dll, so the rest might have been a waste of time.

If steps 1 and 2 were necessary, I did not realize that version number was taken into consideration when registering a  dll.

I would like to split the points for this question. between the both of you for your time, as I should have provided this information in the first place.

I hope this seems a fair resolution. let me know if you do not think so.
BChan
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now