Geeks With Blogs
Matt Roberts Rails and .NET

AKA: "Why am I getting 'ActiveX can't create component' when I try to access my COM DLL's"
AKA: "Why am I getting 'Service Unavailable' when I've set IIS to run in 32 bit compatibility mode.
AKA "Why do I get 404 errors when I browse to my ASPX pages"

Man that's a long title :)

So, I recently had to spend some time looking into getting my companies web application working in 64 Bit Windows (2003 R2 to be exact). I eventually got this working, but found the information scattered and incomplete on the interweb, so this little guide should see you through. I hope someone out there finds it useful.

Starting Point.

You have windows 2003 R2 64 bit SP1. You have the 64bit version of the .NET framework (V2 or higher) installed. No other changes have been made to IIS - it seems to run just fine for serving .NET and HTML. You install your web application that includes COM, try to run it, and BANG...

Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object

The cause? Its because those COM objects are 32 bit components, and by default IIS won't work with 32 components. You need to tell IIS to run in 32 bit compatibility mode (WOW64). To do this, you need to configure IIS to run in 32 bit compatibility mode, as explained by this link.

But wait! Its not quite that easy! If you do this, then you're telling IIS to run in 32 bit mode, but then you've already got the 64 bit ASP.NET DLL's registered with IIS, so the first time you hit your app, you'll probably see a big fat "Service Unavailable" Error message. If you look in the event log, you'll see your application pools are crashing with this error:

A process serving application pool 'DefaultAppPool' reported a failure.
The process id was '4156'. The data field contains the error number.

So, you need to register the 32 bit ASP.NET DLL's with IIS. But wait! You can't do that before you un-register the existing 64 bit ones.

Enough waffling. Here's the step-by-step :-

  1. Un-register the 64 bit ASP.NET DLL's. In a command prompt, navigate to C:\Windows\Framework64\v2.0.50727\ and from there run "aspnet_regiis -u"
  2. Set IIS to work in 32 bit compatibility (WOW64) mode:
    cscript c:\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32BitAppOnWin64 1
  3. Register the 32-Bit ASP.NET DLL's. Navigate to C:\Windows\Framework\v2.0.50727\ and from there run "aspnet_regiis -i"
  4. Finally, in IIS, Navigate to "Web Service Extensions", and make sure that ASP.NET is "allowed".

You're done!

Posted on Friday, April 11, 2008 8:27 AM .net | Back to top


Comments on this post: Get your (old) COM-based or "ASP.NET with Interop" web app working in Windows Server 2003 R2 64 Bit !

# re: Get your (old) COM-based or "ASP.NET with Interop" web app working in Windows Server 2003 R2 64 Bit !
Requesting Gravatar...
Thanks, it was a great help!
Left by Luis Camayd on May 09, 2008 3:25 AM

# re: Get your (old) COM-based or "ASP.NET with Interop" web app working in Windows Server 2003 R2 64 Bit !
Requesting Gravatar...
This helped me out, thanks!

Mike Clarke
Left by Mike Clarke on Nov 13, 2008 10:33 PM

# re: Get your (old) COM-based or "ASP.NET with Interop" web app working in Windows Server 2003 R2 64 Bit !
Requesting Gravatar...
this has been really helpful.

thanks a zillion!!!!!!!!!!!
Left by tushar v on Dec 17, 2008 3:50 AM

# re: Get your (old) COM-based or "ASP.NET with Interop" web app working in Windows Server 2003 R2 64 Bit !
Requesting Gravatar...
Great! It was a really great halpful.

Thanks alot!! :)
Left by greenb on May 10, 2009 1:43 PM

# re: Get your (old) COM-based or "ASP.NET with Interop" web app working in Windows Server 2003 R2 64 Bit !
Requesting Gravatar...
not quite it for me. the dlls won't register
Left by Zed power on Sep 01, 2011 3:31 AM

Your comment:
 (will show your gravatar)


Copyright © Matt Roberts | Powered by: GeeksWithBlogs.net