locked
Active X error can't create object RRS feed

  • Question

  • User-821689857 posted

    Hi All: I have a dll that does a simple encrypt/decrypt of data. I've used it for about 6 years on IIS 5-6. Typically I would just regsvr32 and it would work when called from an ASP page.

     I've moved the website to IIS7 to test, and I ran the same regsvr32 command with the dll, and didn't receive an error.

     Everything works properly except when the dll is called on the ASP page. I'll get a 500 error in the browser, and the log will have something like:

    2007-12-09 20:27:53 192.168.1.196 GET /manager/viewreceipt.asp r_id=497H6P6548164D14W6DA8U3W343ZWN366FLUU2C26GZH663728K21QV61K16262812032007|99|800a01ad|ActiveX_component_can't_create_object 80 - 71.247.15.102 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.1.11)+Gecko/20071127+Firefox/2.0.0.11 500 0 0 156

    the dll is sitting in its own folder outside of InetPub. I've given IUSR read & excute access to the folder and the dll, but am still getting the error. Not sure what to try next?

     

    Monday, December 10, 2007 5:22 PM

Answers

  • User10285400 posted

    Can you instantiate the object in a simple VBScript?  (try running the vbscript as different users, to see if it's a permissions issue)

    Also, try using Failed Request Tracing (a new feature in IIS7) to see potentially more details. 

    http://www.iis.net/articles/view.aspx/IIS7/Managing-IIS7/Diagnostics-in-IIS7/Using-Failed-Request-Tracing/Troubleshooting-Failed-Requests-using-Tracing-in-I 

    Dave

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, December 10, 2007 5:46 PM
  • User1150633239 posted

    Hi everyone,
    I suppose you are running your ASP site on Windows Server 2008 64-bit. I had the same issue with Server.CreateObject(...) trying to instanciate the old VB6 class library, resulting in following errors:
    1) Microsoft VBScript runtime error '800a01ad'
    2) ActiveX component can't create object
    I could solve it by changing one single flag in the site's ApplicationPool configuration (IIS Manager-><Server name>->Application Pools-><Classic ASP Pool>->Advanced Settings): "Enable 32-bit Applications" >> True.

    I hope it's going to work for you, too.

    Kind regards,
    Ireneusz Pisanko-Krzyzanowski
    Itera Consulting
    Sweden

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, July 8, 2010 8:11 AM

All replies

  • User10285400 posted

    Can you instantiate the object in a simple VBScript?  (try running the vbscript as different users, to see if it's a permissions issue)

    Also, try using Failed Request Tracing (a new feature in IIS7) to see potentially more details. 

    http://www.iis.net/articles/view.aspx/IIS7/Managing-IIS7/Diagnostics-in-IIS7/Using-Failed-Request-Tracing/Troubleshooting-Failed-Requests-using-Tracing-in-I 

    Dave

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, December 10, 2007 5:46 PM
  • User-821689857 posted

     Thanks for the feedback...when you say instantiate the object in a simple VBScript do you mean outsde the context of an ASP Page? If so, I'm not sure how to do that (I didn't create this object, someone provided it to me). Also, I'm not sure how to run the VBS as a different user?

     I will try the failed req trace and post the results as well.
     

    Tuesday, December 11, 2007 8:22 AM
  • User-821689857 posted

     Hi: I ran a trace and this is all that's in it:

    <fieldset id="section_detail_294" style="margin-left: 4%; background-color: rgb(255, 255, 255);">
     
    Error
    294. -ASP_LOG_ERROR 
    LineNumber 99
    ErrorCode 800a01ad
    Description ActiveX component can't create object
    </fieldset>
    Tuesday, December 11, 2007 9:17 AM
  • User-821689857 posted

    Also: I had already looked up that error, which led me to a M$ft support page suggesting that IUSR did not have sufficient permissions on the dll...I had earler given permissions to IUSR to access the dll, but that didn't seem to make a difference...is there a different user account that needs permissions like "IWAM" in IIS 6 or something like that? 

    Tuesday, December 11, 2007 9:21 AM
  • User10285400 posted

    The VBScript would be a file named test.vbs containing:

    dim myobj
    set myobj = WScript.CreateObject("YourCOMObjectsProgID")
    WScript.Echo("success")

    Then use the "runas" command to run the script as different users ... it's one way to isolate the issue.

    Dave

    Tuesday, December 11, 2007 2:50 PM
  • User-821689857 posted

    Hi: Thanks for the clarification.

    If  the object's ProgID is the name I call to instantiate the function with Server.createobject() , then when I try to run it from a vbs file I receive the following WSH error:

    Error: Could not create object named  "myobject.myfunction"
    Code: 80040154

    Source: WScript.CreateObject

     I was logged in as the Administrator when I tried to run it.
     

    FWIW: The website is running under the IUSR_[machinename] account. I googled the error code above and found a support note about trying to temporarily add IUSR to the administrators group. I did, and that didn't make any difference.

    The dll is in the registry, and there's only one incidence of it.
     

    Tuesday, December 11, 2007 3:37 PM
  • User10285400 posted

    Frankly, there are any number of reasons why the object can't be created.  It could be a permissions issue (which doesn't seem to be the case here), or your DLL has a dependency on some other binary or API that doesn't exist in Windows Server 2008.  You'll have to debug it further to see your object isn't being created.  Attaching a debugger to your script is one way to do this and/or doing a dependency check.  Sorry I can't help you any more than that. 

    Dave

    Tuesday, December 11, 2007 7:00 PM
  • User-821689857 posted

    well, thank you for trying anyway...unfortunately there is no source code for the dll, and the person who wrote it is nowhere to be found.

    Wednesday, December 12, 2007 10:24 AM
  • User-166116114 posted

    Did you ever get an answer to this, I have exactly the same problem

    Tuesday, March 3, 2009 1:49 PM
  • User-821689857 posted

    Did you ever get an answer to this, I have exactly the same problem

    No, sorry...I ended up rewriting the whole process to remove the need for the DLL.

    Tuesday, March 3, 2009 2:08 PM
  • User-1966281435 posted

     Hello All,

     I have the same problem ( 800a01ad at Server.CreateObject("...") ) when trying to create an object from ASP. Therefore I have written a small ASP script to do that.

    I've tried to create same object from plain VBS and it succeeds.

    Within other threads (on other pages) I have read about this error caused by differencies of DLL file, either a plain COM object (in my case, too) or additionally an ActiveX component. It seems IIS6 could create COM objects (indirectly through ActiveX-DLL only?) but IIS7 not at all? Why I can't enable it then?

     After searching a while I've found only a hint on unmanaged code  and needed extra permission for that? But I thought, classic (unmanaged) ASP should not ask for that?

    I even have tried to give that registered DLL file  full control to user 'Everyone'. Doesn't help, too.

    On same machine it is possible to create nearly every other 'default' scripting objects like ADODB.xxx or Scripting.xxx successfully, so scripting generally works fine.

    I will send a support request to software producer of that DLL file. If I will have some news on it I will re-post here.

     

    Best Regards.

    Wednesday, January 13, 2010 11:17 AM
  • User1150633239 posted

    Hi everyone,
    I suppose you are running your ASP site on Windows Server 2008 64-bit. I had the same issue with Server.CreateObject(...) trying to instanciate the old VB6 class library, resulting in following errors:
    1) Microsoft VBScript runtime error '800a01ad'
    2) ActiveX component can't create object
    I could solve it by changing one single flag in the site's ApplicationPool configuration (IIS Manager-><Server name>->Application Pools-><Classic ASP Pool>->Advanced Settings): "Enable 32-bit Applications" >> True.

    I hope it's going to work for you, too.

    Kind regards,
    Ireneusz Pisanko-Krzyzanowski
    Itera Consulting
    Sweden

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, July 8, 2010 8:11 AM
  • User-821689857 posted

    Ireneusz...you rock! That solved the problem for me!

    Friday, July 9, 2010 2:06 PM
  • User1775971595 posted

    I set the same "Enable 32-bit Applications" to True  to get my 3rd party components running in Classic ASP scripts under IIS7 but then  debugging error messages to the browser stops working even though all the VBScript settings are set to True for debugging. I don't see any errors anywhere like even simple syntax errors or bad SQL statements, just a blank screen and not even a partial part of the page has rendered as the source view shows just the <html><body> tags. Anyone else seeing this? When I switch "Enable 32-bit Applications" back to False then the 3rd party components (JMail, ASPImage, etc.)  stop working and I get the Active X: cannot create object errors again which means I'm seeing the debugging errors to the browser obviously as well as all other syntax and bad SQL statement script errors display in browser. I can't have both it seems. Anyone else seeing this and worked out why?

    TIA, 

     Jerry

    Perth, Western Australia

    Saturday, July 10, 2010 4:33 AM
  • User-2116060401 posted

    I am getting the same error as JerryOfPerth

    Thursday, September 2, 2010 3:18 PM
  • User-2116060401 posted

    I have been able to solve the issue by placing the 32bit components into a seperate directory, and create an application for it in iis - and enabling 32bit to true in IIS for the application pool for the folder...

     Now it displays everything fine...

    Thursday, September 2, 2010 3:52 PM
  • User-1842099582 posted

     Thanks to Ireneusz for that tip. This to get a 32-bit dll working on 2008 R2 64-bit you must put the DLL in the c:\windows\syswow64 directory. Enabling 32-bit Applications just allows this to access DLLs in this directory.

     

    Monday, May 30, 2011 1:10 PM
  • User-212457076 posted

     If you were here, I'd kiss you.  I've been beating my head against the desk over this for week.  One little flag.... that's all it was.  No support anywhere from MSFT.  Nothing.

    I chased down every permission-based-solution to this you could imagine.  I believe at one time I even granted full permission to people who have no computer.

    Thank you, Ireneusz Pisanko-Krzyanowski (who I secretly don't believe is Swedish).  You've made my day. 

    Dziękuję

     

    Tuesday, August 23, 2011 9:55 AM