Connecting Tech Pros Worldwide Help | Site Map

Classic ASP page error ActiveX component cannot create object error

Newbie
 
Join Date: Feb 2009
Posts: 1
#1: Feb 24 '09
I have a web project that used a vb6 class library. The asp page would call a createobject() to access the class library. I recently updated the vb6 class library to .net2005. I unregistered the old class library and registered the new .net dll using regasm using /codebase and registered the dll in the GAC. I can access the dll using a vbscript that just does this:
dim o
set o = createobject( "DataAccess_NET.DataAccess" )
Wscript.Echo o.test

Works perfectly.

if I put the same code in the asp page. I get the error ActiveX Component cannot create the object (DataAccess_NET.DataAccess)

Thinking it might be some security setting I created an aspx page in the same project and on page load I call the same above code. - Works fine.

Does anyone know why it does not work with classic asp. and works in a standalone vbscript and a .net aspx page. Even if I call the same vbscript file from the classic asp page it does not work. I would assume that since I can call the dll the other ways that it is registered correctly. Any help I would appreciate it. I have been struggling on this for a few days!!!
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Feb 26 '09

re: Classic ASP page error ActiveX component cannot create object error


Server objects in classic ASP have been a major source of frustration for me lately and I have given up using all but the standards. If I were you, I would do it as a .NET web service (if you really wanted to keep the interface in classic ASP) which can not only be accessed in classic ASP, it wouldn't need to be updated when the front-end technology changes.

Jared
Reply


Similar ASP / Active Server Pages bytes