Classic ASP page error ActiveX component cannot create object error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jdub33
    New Member
    • Feb 2009
    • 1

    #1

    Classic ASP page error ActiveX component cannot create object error

    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
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    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

    Comment

    Working...