title: Can't instantiate COM object from ASP.NET MVC app
body: <p>As the title says, I want to instantiate a COM object from an ASP.NET MVC app like this:</p>
  
  <pre><code>dynamic obj = Activator.CreateInstance(Type.GetTypeFromProgID(progID));
  </code></pre>
  
  <p>but it throws the following ComException:</p>
  
  <blockquote>
    <p>Retrieving the COM class factory for component with CLSID
    {16542E4F-4594-4B97-922D-BE9C478F93BB} failed due to the following
    error: 800aea5f Exception from HRESULT: 0x800AEA5F.</p>
  </blockquote>
  
  <p>The same code works from a Winforms app with the following build configuration: <code>Platform: x86</code> and <code>Platform target: x86</code>.</p>
  
  <p>I set the build configuration the same as the Winforms app for both the mvc app and the assembly where I use the COM object.</p>
  
  <p>I'm using Windows 7, IIS 7.5, ASP.NET v4.0 Application Pool with Enable 32-Bit Applications True and the website runs under a user with Administator rights.</p>
  
  <p>What are your suggestions to help solve this problem?</p>