Link to home
Start Free TrialLog in
Avatar of beckingh
beckingh

asked on

ActiveX component can't create object

I have a COM object called MosaixLib.Session.

I create it as

<%
set oSession = server.createObject("MosaixLib.Session")
%>

And I get the following error:

MosaixLib error '800a01ad'
ActiveX component can't create object

Now I read this article: http://support.microsoft.com/support/kb/articles/Q194/8/01.ASP 
but none of the three solutions seem to work.  

Here's the situation:
I am running IIS on the same machine as I am working on.
I can create this COM object through VB on the this machine.  So I think the DLL is registered correctly and is not corrupted.
My file system is FAT (not NTFS) so I don't think it is a security issue (although it may be and I just can't figure it out)

Any ideas?




Avatar of drittich
drittich

Try

Set oSession = Server.CreateObject("MosaixLib.Session")
Avatar of beckingh

ASKER

Sorry - it is like that.

 (cuts and pastes this time :) )

<%
Set oSession = Server.CreateObject("MosaixLib.Session")
%>
beckingh,

Are you sure you are using the right library name? Check the registry using the information in the knowlege base article to check the registry for the registered name.

Gary
Is IExplorer configured to accept ActiveX objects?
Security, Settings, ActiveX controls and plugins (set all to enabled)

Is MSDTC running? ('cos if you use server.CreateObject, it needs to be)
Hi..
Check in the Registry Whether the particluar component Exists or not...

May be U are Running this Problem Because
1)Regsistered in the Client and Not Registered in the server

Since U use asp ..u need to register in the Server for Running the Component..


2)The Dll Runs on Implemente Inheritence
ie Ur dll calling another and that calling another ..so If anyone of the Child dll is not there ..u can get this Error..

So that is may be Reasons...

If U have Visual Studio then Use the tools and select depends. Then Select ur Dll which will Display all the Dll that Ur Dll Uses and Now check whether all the dll are there in the server where u run ur IIS or PWS...

Hope Clear

regards

Manikantan
gbaren:

Yeah, its the right library name.  I checked the registry, AND I can create this same object in VB.

NigelRowe:

It is configured to accept activeX objects.  Would this make a difference?  The object will be created on the server, not by IE.

MSDTC - I have tried it both with it running and without.  When it isn't running I get that error.  If it IS running, it just freezes up.  

I can create OTHER objects in my page even without MSDTC running, so I thought that it didn't have to be running to create objects.

Manikantan:

1) It is registered (client and server are same)
2) I ran depends - seems the only dependency is MSVBVM50.dll, so that's not it.
Alright, check this out.

I created another COM Object, ChrisTest.ChrisMTSTest and set it up exactly as the other object is.

it is created fine by MTS.  So I decide to get tricky and make a function in that object that creates the object I am looking for (just for testing purposes of course).

Public Function mySession() As Object
    mySession = CreateObject("MosaixLib.Session")
End Function

It doesn't work.  It creates the test object fine, but when it gets to the function call in the ASP script...

Set oTest = Server.CreateObject("ChrisTest.chrisMTSTest")
Set oSession = oTest.mySession

....it fails.  Gives me Remote Procedure Call failed error.
beckingh,

It sounds like MosaixLib.session initialization is failing under ASP.

Try setting basic authentication (turn off integrated) and give it a try. Just to rule out security.

Gary
I mean

Public Function mySession() As Object
    Set mySession = CreateObject("MosaixLib.Session")
End Function
I'm not sure exactly what you mean gbaren, I tried setting the authentication to "Basic" under Directory Security -> Authentication Control and that didn't help.

Plus, now I'm getting a different error:

006~ASP 0177~Server.CreateObject Failed~Not enough storage is available to complete this operation.

Grrr...
Is the component in a MTS package?

As I said, if you use server.CreateObject, then iis communicates with MSDTC so you should make a library or server package in MMC and register the dll as a component (it does not have to be transactional)
nigel:

Yeah, it is registered as an MTS component.
How about the threading model... Is it set to Apartment threading on the com-component????

hmmm....
Is the error occuring on instantiation or on a method/property call..?



Anuravi:

I don't have access to the source code for the COM component, so I'm not sure.  Is there some way to tell through MTS or some other way.

OxleyD:

It is occuring on instantiation (on server.createobject()).
hmmm,

Do you know if there is any code in the initialise event for this component..?
hmmm,

Do you know if there is any code in the initialise event for this component..?
hmmm,

Do you know if there is any code in the initialise event for this component..?
oops

I don't know, but If I had to make a guess I'd say yes...  why?



Is it doing with a database connectivity at all. We had got this error on one of our com-component written in VB.
After a long struggle we figured it was due to ADO.
if the dll was compiled wit ADO2.1 it worked fine but if we change the ADO to 2.5 it used to give that not enough storag error,....



I dont know how to check the threading model...
May be if you have activeX viewer that will give more details...

Yeah there is database connectivity...  but if there is, why don't I see a dependency on some DLLs relating to that?   The only dependency I see is to the VB 5.0 dll.

What can I do to test this out?  Should I reinstall MDAC or something like that?
Strangely enough, I had the error you described above '006~ASP 0177~Server.CreateObject Failed~Not enough storage is available to complete this operation.' only yesterday. It was due to two different components being the wrong version. The problem was corrected by removing them from MTS package, doing a regsrv32 /u ...., re-compiling the components and reinstalling the components in their respective packages. Unfortunately, as you don't have the code for the dll, you can't recompile. However, you could do the MTS bit (sometimes MTS appears to f***up somewhere along the line). Delete the component from the package (you don't have to delete the package). Start a dos session, CD to the directory where the dll is, regsrv32 /u MosaixLib.dll. Maybe you could post the package & component properties.
Reregister the component in its package, set the properties. Incidentally, is it transactional? (I noticed that there is ADODBC connection somewhere in it). Check that there are no other copies of the dll somewhere on the disk.
Do you have the source code for the vb5.0 dll.
IF so can you check  which ADO version it is referencing?
There is no harm in re-installing MDAC. I will also check the SP if any for MTS on Microsoft.com site.

anuravi:
I don't have the source code...  I have the mdac_typ.exe for both DAC 2.0 and 2.1

I am pretty sure I have 2.1 installed - maybe I should try installing 2.0...
nigelrowe:

It is set up without transactions.  But I have tried the other way too and get the same error.

I tried what you said with MTS - didn't work.

Any other ideas?
Tried reinstalling MDAC 2.1...  did nothing.

I was thinking about installing another version to see if that makes a difference but I'm kind of scared...  don't know what effect it will have on SQL Server 6.5, for example.
do u have any depended dll's that are not in mts...
anuravi:

I don't think so...

But when I run depends I only see
MSVBVM50.DLL
     KERNEL32.DLL
     USER32.DLL
     GDI32.DLL
     ADVAPI32.DLL
     OLE32.DLL
     OLEAUT32.DLL

BUT,  is it possible to have dynamic dependencies that I am not accounting for?

If so how do I tell what they are?
Yes I was mentioning about the dynamic dlls.. I dont know how to look for them....

IS it still giving you not enough storage problem... Did you attempt registering outside of MTS ( does it give any problem?)
If u r  successful doing that unregister it and put it back in MTS and hope for the best.. I am running out of options.
Guys...  I figured it out... just wanted to let you know.

It was a corrupt DLL.  I reinstalled MDAC, stopped using MTS, and created a separate anonymous user for my application.

AND NOW IT WORKS!

Thanks for all your efforts, I wish they would have helped so I could have given some points.

Sorry!
Deleting because I solved the problem myself - thanks for all your help guys!
This question has a deletion request Pending
Avatar of Asta Cu
Greetings,

This question is still open today, perhaps overlooked.

Numerous experts have provided input, perhaps you'd like to update with current comments as to your situation here so that you may 1) close by accepting comment which assisted you to grade as the answer or 2) advise here what your plans are in this regard.

Thank you,

Asta
hee hee..

Astaec:  Have you actually looked closely at this thread?

Scroll down from the top and find my comment that starts "Guys...  I figured it out... just wanted to let you know...."

Look at the dates on that one and the ones that come after...
Actually, I did, and it was tough, since all these really old questions don't comply with comment sort order on date/time.

Perhaps you'd just like to post a zero point question, include this link and ask for a delete/refund.  If you feel this had value, they can move it to the PAQ to help others seeking this solution rather than deleting, but still returning your points.

I agree with your "hee hee", it's truly bizarre to try and decipher out of order information.

":0)  Asta
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial