One Solution for a “Service Unavailable” Error Message in IIS6

Are you encountering an “Object can’t be created” error or “Service Unavailable” error with your web applications when using a 64-bit OS and IIS6?

I was assisting a customer recently with what appeared to be a typical installation. He had a Windows Server 2003 (x64) machine, which was running IIS6. His classic ASP application was throwing an “Object can’t be created” error (ActiveX component can’t create object). This is a fairly common configuration error for customers running applications with 32-bit COM Objects on 64-bit operating systems. The typical resolution is to double check that the customer’s DLLs are registered properly in the registry. If that doesn’t fix things, we make sure that IIS6 is running in 32-bit compatibility mode:

cd %systemdrive%\Inetpub\AdminScripts
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 1

Unfortunately, after changing these settings his entire site was throwing a “Service Unavailable” error message.

After some research, I found that the customer’s site was using ASP.NET in addition to Classic Asp. The already registered ASP.NET 2.0 DLL was 64-bit specific and needed to be switched with a 32-bit compatible version to function with IIS6 in 32-bit compatibility mode.

The following lines of code set IIS6 to run in 32-bit compatibility mode, reinstall Asp.NET 2.0 with the correct bitness, and reset IIS to make sure that our changes take effect:

cd %systemdrive%\Inetpub\AdminScripts
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 1
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i -enable
iisreset

With the proper Asp.NET 2.0 DLL in place, we could run IIS6 in 32-bit compatibility mode without issue, the application worked beautifully, my customer was happy, and I managed to get home in time for dinner.

Related posts: