I developed a web application using asp.net C# to place online orders. my app. works fine on SAP server (windows 2008 R2) but when I copied my project to my local machine (runs windows 7) I got an error, can't see the SAPbobsCOM reference. I don't have SAP API DI on my machine
 I tried to debug my application in X86 to solve the problem. but no luck.
this is the error I got 
Retrieving the COM class factory for component with CLSID {632F4591-AA62-4219-8FB6-22BCF5F60090} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
thank you
The problem is caused by having Any CPU platform target selected for your app.
This means your app could run as both 32x and x64 process depending on a .NET runtime bitness executing your app. If your process runs as x64 and you have 32x DI API installed (or vice versa), you get this issue, since DI API requires loading native DLLs into your process. However, 32x DLLs couldn't be loaded into a x64 process and vice versa.
That's why we have to explicitly allow the exact same bitness for your app as the DI API bitness it would use.
To do this:
c:\Program Files\SAP\SAP Business One DI API\) and SAP Business One SDK (c:\Program Files (x86)\SAP\SAP Business One SDK\) installedc:\Program Files - you have x64 version and if it's in c:\Program Files (x86)\ - you have x86 one
I had the exact same issue. My SAP components was running in a WCF service.
To fix the issue changed the application pool to run under 32-bit.
I got the same problem. It was because the SAP Business One references SAPbobsCOM and SBODI_Server were missing. I added these references and it worked. You need to add SAP DI API on your machine for using SAPbobsCOM reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With