ActiveX cannot create object on old site hosted on Win7 64bit

My colleague and I ran into a problem today where an old ASP site had problems creating old VB6 components. So as not to forget what to do;

In Win64 the registry is conceptually broken into two versions, one for 64 and one for 32 (or Wow). So when you register a 32bit COM component then it lives under HK_CLASSES_ROOT\Wow6432Node rather than just HK_CLASSES_ROOT. This is important because when we were profiled the registry access would could see that the call to create the object was failing because it couldn’t locate the prog id in CLASSES_ROOT. The reason it was looking there was the web site was running as a 64bit process and therefore was looking in the Wow section. The answer to the problem was hidden away in the Advanced Settings of site’s Application Pool in IIS. By turning on ‘Enable 32bit applications’ the OS was able to redirect the registry requests to the correct location and the object was successfully created.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s