COM Interop Error

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.
LVL 4
BChanAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
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
 
GoodJunConnect With a Mentor Commented:
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
 
BChanAuthor Commented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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

Bob
0
 
BChanAuthor Commented:
Bob,
it is a home-cooked,  vb6 object.

Brian
0
 
dfiala13Commented:
Does the test server have the VB runtime installed?
0
 
BChanAuthor Commented:
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
 
dfiala13Connect With a Mentor Commented:
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
 
BChanAuthor Commented:
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
 
dfiala13Commented:
Is it a domain server?
0
 
BChanAuthor Commented:
It is not a domain server.
0
 
dfiala13Commented:
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
 
Bob LearnedCommented:
What are the project references and components that are pertinent (ADO, MSComm, etc.)?

Bob
0
 
BChanAuthor Commented:
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
 
BChanAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.