Iis – Server.CreateObject_Failed error when creating a COM object on IIS7 using classic ASP

aspcomiis

I am trying to migrate a classic ASP application from a Windows Server 2003, IIS6 server to a Windows 2008, IIS 7 server.

The ASP page comes up fine, but the first time it tries to use our .NET interop DLL, it fails with the following error in the IIS logs:

2012-01-06 18:50:41 X.X.X.X POST /downloads.asp |27|ASP_0177_:_8000ffff|Server.CreateObject_Failed 80 – X.X.X.X Mozilla/5.0+(Windows+NT+6.1;+rv:8.0)+Gecko/20100101+Firefox/8.0 500 0 0 0

The corresponding line in the ASP page is:

Set subscription = Server.CreateObject("DLLNAME")

I successfully registered the DLL using RegAsm.exe, and confirmed by using a VBscript that successfully called CreateObject. I've also ensured both NETWORK SERVICE, IUSR_MACHINENAME, and IUSR have read access to the DLL location and the HKEY_USERS…Internet Settings\Zones.

Any thoughts?

Best Answer

If it works from VBScript, perhaps it's a bitness problem?

Worker processes might be set with Enable32BitApp set to True, which is 32 bit, and the VBScript run from a regular CMD prompt would match the bitness of that prompt (which is 64 bit unless run from SysWow64).

So... check the Bitness is OK first. If it is, try ProcMon to log whatever the app's looking for, and check the event logs for specific error messages.