When performing SharePoint upgrade from 2007 to 2010, we face a challenge in legacy components especially COM based components, and the problem raises when those COM components are compiled and targeted to 32bit operating system, in this post I will explain how we can solve this issue by hosting COM based component in COM+ serviced components that is referenced on SharePoint 2010 64bit operating systems.
Legacy COM component targeted to 32bit OS can only live in a 32bit process. And due the fact that SharePoint 2010 can only have a 64bit process so our COM Component couldn’t live inside SharePoint process.
COM components can run under COM+ serviced components and consumed in 64bit process even though the original COM components are compiled and targeted to 32bit OS, As a solution “provided that we can’t recompile the COM to 64bit OS” is to host the COM component inside COM+ serviced component in separate 32bit process and had SharePoint 2010 to call it remotely instead of hosting it inside it’s process.
We will start by creating serviced component as follows:
From control panel click on administrative tools then component services
Create new COM+ Application as follows:
Create empty application that will host the COM component
Select server application in order to run the COM component in separate process that runs in 64bit version, in this way SharePoint 2010 can access the COM component that was originally designed for 32bit without hosting the COM in SharePoint 2010 process.
Now after creating the COM+ application we need to add the COM component to the components section as indicated in picture below:
Install new component to add existing COM component to the serviced application
Now you can access the COM component from your SharePoint application as it was originally referenced in old 2007 version on 32bit OS.
You must log in to post a comment.