ActiveX component can't create object

I have created a simple app and registered it with regsvr32. I can access my interface within C++ and VB apps but not from within ASP. I get the following response in my browser:

Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
logon.asp, line 27

My question is...what do I have to do different for ASP than what I do for C++ and VB?
awjacobAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PepsterCommented:
what does your code look like?
0
ZizzerCommented:
As Pepster says, we'd need to see the code in order to be sure.

However, my hunch is that this is an early- vs. late-binding problem.  In VC++ and (probably) VB clients, you create the object via its CLSID; in ASP, you create the object via its ProgID.  The difference is this:

   Set x = new Foo    ' VB

as opposed to this:

   Set x = Server.CreateObject("Foo.1")   ' ASP

So my guess is that you're not specifying the correct ProgID when you call CreateObject() from your ASP page.

-- Zizzer
0
awjacobAuthor Commented:
LOGIN.ASP (extraneous code removed)
<%
  userid = UCase(Request.QueryString("userid"))
  password = UCase(Request.QueryString("password"))
  Set ta2000Security = Server.CreateObject("DicoreASP.TA2000Security")
  ta2000Security.Logon userid, password, ""
%>
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

awjacobAuthor Commented:
The ProgID is exactly as it appears in the registry key:
VersionIndependentProgID="DicoreASP.TA2000Security"
0
manojaminCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
awjacobAuthor Commented:
DicoreASP is a Visual C++ 6.0 application mostly generated via wizards. The project was created using the "ATL COM AppWizard." Server Type is DLL.

The TA2000Security object was created through the ATL Object wizard choosing the ActiveX Server Component taking all the default settings. I added the Logon as a method.

Is this the correct VC++ way to create an object for ASP?
0
rmgalanteCommented:
Does your COM Object support the IDispatch interface.  It has too if you want to access it from ASP land.
0
awjacobAuthor Commented:
DICOREASP.IDL:

import "oaidl.idl";
import "ocidl.idl";
  [
    object,
    uuid(B1EB26B1-9E94-11D3-B024-0004ACEB9028),
    dual,
    helpstring("ITA2000Security Interface"),
    pointer_default(unique)
  ]
  interface ITA2000Security : IDispatch
  {
    //Standard Server Side Component Methods
    HRESULT OnStartPage([in] IUnknown* piUnk);
    HRESULT OnEndPage();      
    [id(1), helpstring("method Logon")] HRESULT Logon([in] BSTR userid, [in] BSTR password, [in] BSTR newPassword);
  };

[
  uuid(B1EB26A4-9E94-11D3-B024-0004ACEB9028),
  version(1.0),
  helpstring("DicoreASP 1.0 Type Library")
]
library DICOREASPLib
{
  importlib("stdole32.tlb");
  importlib("stdole2.tlb");

  [
    uuid(B1EB26B2-9E94-11D3-B024-0004ACEB9028),
    helpstring("TA2000Security Class")
  ]
  coclass TA2000Security
  {
    [default] interface ITA2000Security;
  };
};
0
awjacobAuthor Commented:
manojamin,

I have read through the link you provided. Thank you. I have followed their instructions -- I have checked and rechecked my program's registration, I used Depends to see all my dependent dlls and have copied those to the same directory as my dicoreasp.dll, and that directory has read access to the Everyone group. I still get the same result.
0
awjacobAuthor Commented:
Adjusted points to 200
0
manojaminCommented:
I am trying to rebiuld your case, however for some reason, my ATL Wizrd does not show any Template objects.

Anyway, why don't you visit following site?

http://msdn.microsoft.com/workshop/server/asp/comp.asp#ASP-intrinsics

I saw one difference in your OnStartPage method. you are passing IUnknown and these guys are passing IDispatch. (thet are talking about VC 4.2 and 5.0 there)

I don't know if this will make a difference though as ultimately it's all IUnknown...

I would say just visit that page anyway, you might find something there..

0
deepaklakhaniCommented:
I had a similiar problem while using one upload component(caprockafu). Check the site suggested by manojamin ( i.e. http://support.microsoft.com/support/kb/articles/Q194/8/01.ASP ). This should be of good help .

( From the three problems mentioned in the article, I had a problem related to security )
0
awjacobAuthor Commented:
I removed all links to my security DLLs and hard-coded return codes and data in there place. The object is now callable by my vbscript. This leads me to believe that their is a DLL being called dynamically be my security DLLs.
0
awjacobAuthor Commented:
Sorry about the long wait to judge your answer. I was out on an extended Thanksgiving vacation...Good job!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.