I got a winsvr2008r2 x64 which I've made the following observation on:
If I create a COM+ application manually and manually install all components through the Component Services GUI everything runs as 64-bit.
But if I install everything using code (System.EnterpriseServices.RegistrationHelper.InstallAssembly
), the COM+ components run as 32bit.
Is it possible to get everything running as 64-bit when using InstallAssembly
?
When you call
InstallAssembly
, internally, a methodValidateBitness
is called, which checks whether the assembly was already installed with the wrong bitness, in which case it reports an error and fails withRegistrationException
. It determines what the "right" bitness is depending on the result of a call toIsWow64Process
.Looking further, it appears that there's one way of registering for 64 bit and 32. This seems to be correct, as the registration depends on the bitness of the running application (the one that calls
InstallAssembly
). Can you confirm that this is indeed running as 64 bit?It is possible that you've run into a reported bug that is marked "will not be fixed anytime soon". I cannot judge whether this bug is fully applicable to your scenario, because I'm not certain whether the setup calls the same API functions internally. See this post on Microsoft Connect on register keys being stored in the wrong hive.