3

I'm trying to move a classing ASP site to a 64-bit Windows 2008 server. The problem I have right now (there may be others if/when I get past this one) is that the site depends on an old VB6 DLL (32-bit), and I get the notorious "ActiveX component can't create object" error.

I tried taking IIS7 out of the equation by trying to get it to work with a simple VBS script file, and that's giving me the same thing.

The only dependency this DLL has is ADO 2.6, and from what I've read, this isn't supported and isn't needed for Windows 2008, as WDAC is included and has replaced MDAC.

I use the following to register my component:

C:\Windows\SysWOW64\regsvr32.exe "C:\MyVb6Com.dll"

I checked the registry, and everything appears correct there. My VBS file is also simple:

CreateObject("MyVb6Com.Session")

And it throws the error immediately:

ActiveX component can't create object: 'MyVb6Com.Session'

On the IIS end, I've already tried changing the application pool's settings to enable 32-bit applications, and that didn't help either (of course, if I can't get it to work w/ VBS file, this wouldn't make a difference either way).

Any help would be very much appreciated.

Jerad Rose
  • 15,235
  • 18
  • 82
  • 153
  • 1
    Make sure you use the 32-bit WScript to test your VB Script as well. Double-clicking it will use 64-bit. – vcsjones Jan 05 '11 at 02:52
  • Thanks, vcsjones. I actually was using the 64-bit version, and once I switched to 32-bit, that worked. So I then tried the web site again, and oddly enough it worked too. So something I did when trying to get the VB script to work, fixed the IIS issue. Too bad I have no idea what it was. Thanks for your help. If you don't care, put this as an answer, and I will mark that, since it helped troubleshooting in my case. – Jerad Rose Jan 05 '11 at 03:05
  • huh. Well, as long as it works :-) – vcsjones Jan 05 '11 at 03:08

2 Answers2

2

Make sure you use the 32-bit WScript to test your VB Script as well. Double-clicking it will use 64-bit - that will help go to diagnosing your issue.

vcsjones
  • 138,677
  • 31
  • 291
  • 286
  • As stated above, this is what led me to getting the VB Script to work. Unfortunately, once I tried the site, my problem had already been fixed by one or more of the various steps I took to get this working, so I'm not sure what the root problem/solution was. If I ever figure it out, I will update the original post. Thanks again, vcsjones, for your help. – Jerad Rose Jan 05 '11 at 18:53
2

In the app pool driving your IIS7 website, choose Advanced Settings and near the top, set Enable 32-Bit Applications to True.

IIS7 on a 64-bit machine will not use 32-bit DLLs unless this is set.

Jason
  • 3,020
  • 2
  • 24
  • 23