IIS 7 and Above
Active X error can't create object
Last post Aug 23, 2011 02:55 PM by webRonin
Dec 10, 2007 10:22 PM|e1ny|LINK
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 - 126.96.36.199 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:188.8.131.52)+Gecko/20071127+Firefox/184.108.40.206
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?
Dec 10, 2007 10:46 PM|davcox|LINK
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.
Dec 11, 2007 01:22 PM|e1ny|LINK
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.
Dec 11, 2007 02:17 PM|e1ny|LINK
Hi: I ran a trace and this is all that's in it:
Dec 11, 2007 02:21 PM|e1ny|LINK
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?
Dec 11, 2007 07:50 PM|davcox|LINK
The VBScript would be a file named test.vbs containing:
set myobj = WScript.CreateObject("YourCOMObjectsProgID")
Then use the "runas" command to run the script as different users ... it's one way to isolate the issue.
Dec 11, 2007 08:37 PM|e1ny|LINK
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"
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.
Dec 12, 2007 12:00 AM|davcox|LINK
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.
Dec 12, 2007 03:24 PM|e1ny|LINK
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.
Mar 03, 2009 06:49 PM|psnooc|LINK
Did you ever get an answer to this, I have exactly the same problem
Mar 03, 2009 07:08 PM|e1ny|LINK
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.
Jan 13, 2010 04:17 PM|krugg|LINK
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.
Jul 08, 2010 01:11 PM|Irexus|LINK
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" >>
I hope it's going to work for you, too.
Jul 09, 2010 07:06 PM|e1ny|LINK
Ireneusz...you rock! That solved the problem for me!
Jul 10, 2010 09:33 AM|JerryOfPerth|LINK
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?
Perth, Western Australia
Sep 02, 2010 08:18 PM|zaluckyb|LINK
I am getting the same error as JerryOfPerth
Sep 02, 2010 08:52 PM|zaluckyb|LINK
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...
May 30, 2011 06:10 PM|pekard|LINK
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.
Aug 23, 2011 02:55 PM|webRonin|LINK
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.