views:

62

answers:

2

Hey All,

I'm wondering if anyone else has experienced failed DLL's after upgrading their servers.

My company is in the process of upgrading our code and server's after ten years of using classic ASP. We've set up our new server running Windows 2008 and IIS 7. Our classic ASP code and our new asp.net mvc code work pretty well.

Our problems started happening when we began moving our old websites to the new server. When trying to load the page on the actual server machine's browser, we initially got a 500 error. If we refreshed the page then some of the page would load but then display an error:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/folder/scriptname.asp, line 24

800401f3

btw: On remote machines we would just get 500 errors.

Line 24 is the first executable code in the script:

'23 lines of comments

set A0SQL_DATA = server.createobject("olddllname.Data")

'the rest of the script

That specific line is trying to use a ten year old DLL to create a server object. I don't think the server configuration is a problem because I'm able to create "adodb.recordset" server objects without any problems.

Is there an issue when running correctly registered old DLL's on 64 bit systems?

Is there a way to get old DLL's working on 64 bit systems?

Edit

I have confirmed that the site's application pool is running in 32bit compatability mode, but the site still sends the same errors whenever set A0SQL_DATA = server.createobject("olddllname.Data") is called.

+1  A: 

Well, error 800401f3 means "invalid class name." That strongly suggests that the DLL is registered with the wrong ProgId (or that the ProgId is missing entirely). When your sys admin verified that the DLL was registered, did he also verify that its ProgId is "olddllname.Data"?

Peter Ruderman
Hmmm... I'll double check with him.
quakkels
He doesn't know what the ProgId is. I'm gonna google it.
quakkels
+2  A: 

Is there an issue when running correctly registered old DLL's on 64 bit systems?

Yes, the most prominent example of a 32-bit DLL no longer working on 64-bit Windows seems to be the Microsoft Jet Engine, i.e., the driver required to access .mdb files. Since there is no 64-bit version, the only way to access .mdb files in classic ASP application is to run IIS (or the Application Pool, to be precise) in 32-bit compatibility mode.


How to detect if you are in 32 or 64 bit mode (untested):

Set shell = CreateObject("WScript.Shell")
Response.Write shell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%")

This should output AMD64 in 64-bit mode and x86 in 32-bit mode (either native 32-bit or 32-bit emulation on a 64-bit processor).

Heinzi
I talked to my sys admin... he believes that the site is already in 32bit mode. Is there a way I can confirm that? could there be a different problem?
quakkels
@quakkels: I've added some ASP code to test if you are in 32 or 64-bit mode.
Heinzi
@Heinzi - Thanks for the code. It shows "x86" but the site still does not run this dll
quakkels
@quakkels: Then there must be some other issue. Is the DLL registered correctly? Since it's a 32-bit COM object, you might want to try `C:\Windows\sysWOW64\regsvr32 path\to\your\old\dll.dll`
Heinzi
@Heinzi - My admin doublechecked that all the dlls were registered. Still no change in the error text.
quakkels
Do you have Office installed on your server? If yes, try to run `set A0SQL_DATA = CreateObject("olddllname.Data")` in the Immediate Window of a VBA project. If that fails, you know that your error has nothing to do with IIS.
Heinzi
oooh... thanks! I'll try that now
quakkels
@Heinzi - We just got word 2007 installed on the server and I ran your line of code in a macro `set A0SQL_DATA = CreateObject("olddllname.Data")`. The macro errored and delivered `Compile Error: Invalid outside procedure.` I'm not sure what this tells us other than it doesn't work regardless of IIS 7.5. Could it be that the dll is 16bit?
quakkels
@quakkels: Ah, that's just a VBA error. Run it in the Immediate Window (you get there with `Ctrl-g`).
Heinzi