I have a legacy VB6 application that makes calls to a COM+ component written in C# (targeting .NET Framework v2) for TCP/IP communications.
This mode of operation has worked across various operating systems and has been successfully deployed to Windows XP, Vista and 7 environments.
I've just started testing the software in Windows 8.1 and when the VB6 application tries to make calls to the COM+ component it reports "automation error". These kinds of errors in the past have been due to the COM+ registration failing and are quickly rectified by manually registering the COM+ component using regsvcs.exe
.
The software is installed by and MSI which also runs a script which calls regsvcs.exe to register the COM+ component. For Win 8.1 I had to change the path of regsvcs.exe
from:
C:\Windows\Microsoft.NET\Framework\v2.0.50727
To:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
I tested this installer on both Win 7 and Win 8.1. On Win 7 the COM+ calls work fine. The problem I'm having with Win 8.1 is that the COM+ component seems to be registered properly, however the calls to the component still fail. Everything looks fine in Component Services and the COM+ application starts when the VB6 call is made, but the automation error is returned and the call fails.
Note: The Win 7 and 8.1 environments I'm testing on are 64 bit.
It seems that something relating to Component Services and COM+ applications has changed between Windows 7 and Windows 8.1, but I can't seem to find a solution.
Has anyone experienced something similar or any pointers on what the problem might be?
After many hours of trying different things, I've found a solution. I had to enable .NET Framework 3.5 (including Framework 2) and change the path to
regsvcs.exe
back toC:\Windows\Microsoft.NET\Framework\v2.0.50727
.Now after re-installation the calls to the COM+ component are working. Still unsure as to what the difference is between using this utility from the v2 folder and the v4 folder.
As an aside, while trying to enable .NET Framework 3.5 using the 'Turn Windows Features On and Off' feature in Programs and Features, I kept getting the error
0x800F0906
.I ended up having to install it from the mounted Windows 8.1 ISO using the following command:
Where E:\ is the drive letter of the mounted ISO.
The process I followed was described here: https://yellowduckguy.wordpress.com/2012/10/19/windows-8-fix-enable-feature-net-3-5-error-0x800f0906/