COMException (0x800a01ad): ActiveX component can't create object
While troubleshooting an issue with a customer I found this error from an ASP.Net page while trying to create a COM object. The web page was hosted from IIS6 on a Windows Server 2003 machine.
Troubleshooting further I figured that the OS was 64 bit and w3wp.exe was running as a 64 bit process trying to create a 32 bit COM component. I was happy to work towards a resolution such as enabling the Enable32bitAppOnWin64 flag. However it did not resolve the issue and created more problems for the customer. They weren’t able to run any web page and got the error “Service Unavailable”. Carefully following the KB http://support.microsoft.com/kb/894435 I suspected that ASP.NET 2.0 (32-bit) might not be installed. I followed the instructions below:
After you have enabled Enable32bitAppOnWin64 to 1, to install the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root and under you need to run the command:
A screen shot is shown below for a reference:
Also make sure that the status of ASP.NET version 2.0.50727 (32-bit) is set to Allowed in the Web service extension list in Internet Information Services Manager. Please see a screen shot for a reference. Note: By default ASP.NET version 2.0.50727 (32-bit) is set to prohibited. You need to allow it explicitly.
Once the above settings were configured, we saw the web page running, but still got the same COMException. Finally figured out that the web page trying to create the COM object was referring to another .Net COM assembly. Registering the .Net COM assembly with RegAsm.exe resolved the COMException (0x800a01ad).
I hope the article helps in troubleshooting COMExceptions of these types.