2
votes

I have read a few solutions for this problem but none of them have worked for me. One of the main problems is that I am fairly sure I have a 32-bit dll that I am trying to use and I am trying to run it on a 64-bit server. Also I do not have the source code for the Interop dll. Most of the solutions I found involved making changes to the DLL and recompiling.

I have registered this dll using RegAsm.exe. The dll resides in the C:\Windows\SysWOW64 folder. It appeared to have registered fine, there were no errors.

I am trying to migrate a classic ASP web site from Windows Server 2003 (IIS 6) to Windows Server 2008 R2 (IIS 7.5).

One solution I found mentioned something about creating a VBS script and running that in the SysWOW64 folder. I'm not sure why running the script in the SysWOW64 folder was important but I did it anyway. I still cannot create the object.

I just copied and pasted code from my classic ASP page into the VBS script and added the Wscript.echo command.

Below is my VBS script.

Dim objCrypt, Key, UID, Pwd
Set objCrypt = CreateObject("MyEncryptionTool.Crypt")
Key = "1234" ' Encryption Key

UID = "äRŸê¬ÈH­" 
Pwd = "á@‰ë•ÆW¬"

Wscript.echo "UID: " & objCrypt.Decrypt(UID, Key) & vbCrLf & "Pwd: " & objCrypt.Decrypt(Pwd, Key)

The error message that CScript.exe produces is:

C:\Windows\SysWOW64\CryptTest.vbs(2, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'MyEncryptionTool.Crypt'

This is essentially the same error I am getting in my classic ASP page.

I am fairly sure it was compiled 32-bit and Windows Server 2008 is 64-bit and that may be the source of my problem right there.

Is it possible to use a 32-bit dll on Windows Server 2008 R2?

1
I just ran Dependency Walker on my dll. It says that GPSVC.DLL and IESHIMS.DLL are missing. And it appears there is a warning for IEFRAME.DLL and SHLWAPI.DLL. I don't know if this has anything to do with my problem or not. I'm throwing this out for smarter people than me.Robert Lawson
Yes it's possible. You need to enable 32 bit applictions in your app pool - it's set to false by default.John
The App Pool I created for my web site did have Enable 32bit applications set to True but the DefaulAppPool was False. Unfortunately when I set the DefaultAppPool to True nothing changed. CreateObject still does not create the object.Robert Lawson
You should listen to your dependency walker. If your DLL is missing dependencies then it will not load! Ahh, the good old days of DLL Hell just don't want to become the good old days!Paul Sasik
Perhaps but some of the answers to the question of these two dlls not being on Win 7 or 2008 R2 suggested that they aren't necessary. But I could not find anything definitive saying they are or are not necessary.Robert Lawson

1 Answers

0
votes

I should have posted the answer to this back in December 2014 when I figured it out. It was a stupid operator error. There are two dll files for the company's encryption tool. One has the prefix "interop." and the other doesn't.

I was using the one with the "interop." prefix because at the time that was the only dll I knew about. I found the version without the prefix and registered it with no problem and everything works. This came about when I finally found some documentation on the company's encryption tool and it never mentioned the dll with the prefix.