title: SAP Business One DI API for ASP.NET Web Application
body: <p>I developed one console application using DI API(x64). Now I am trying to develop a web application using the same code but getting the following error in the very first line </p>
  
  <pre><code>SAPbobsCOM.Company sboCompany = new SAPbobsCOM.Company(); //in this line
  </code></pre>
  
  <p>Retrieving the COM class factory for component with <code>CLSID {632F4591-AA62-4219-8FB6-22BCF5F60090}</code> failed due to the following error:</p>
  
  <blockquote>
    <p>80040154 Class not registered (Exception from HRESULT: 0x80040154
    (REGDB_E_CLASSNOTREG)).</p>
  </blockquote>
  
  <p>I have tried changing <code>Platform target</code> (<code>x84, any, x64</code>) but no luck. I also have <code>Enabled 32-Bit Applications on IIS</code>.</p>
  
  <p>I am using Visual studio 2017 community version and Windows 10(x64). </p>
  
  <p>I have no idea why I am getting this error as its perfectly working for my console application. I have seen some are suggesting to use <code>DI Server for web application</code> but I am wondering if its possible to use DI API as I won't have much traffic.</p>
  
  <p>Any help would be highly appreciated.</p>