title: Open outlook in ASP.Net
body: <p>I have an ASP.net application that would open an outlook on a certain function.
  sample code:</p>
  
  <pre><code>Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
          Microsoft.Office.Interop.Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
          oNS.Logon(null, null, true, true);
  
          Microsoft.Office.Interop.Outlook.MailItem oMail = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
          oMail.Subject = "Sample Subject";
          oMail.To = "test@yahoo.com";
          oMail.HTMLBody = "Sample Paragraph";
          oMail.Display(false);
  
          oApp = null;
          oNS = null;
          oMail = null;
  </code></pre>
  
  <p>This is working just fine when I run it through Visual Studio.
  After that I publish it to IIS 5.1 so basically i'm using windows xp machine.</p>
  
  <p>Now I've run it using the published version on IIS, and i got the error <em>"Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046}"</em>.</p>
  
  <p>I've fixed it by putting an impersonation on the web.config file. Now the application is running successfully without error.</p>
  
  <p>But the problem now is it doesn't seem to open the outlook, I've tried debugging it via attach to process on aspnet_wp.exe and was able to attach to a break point and it seemed to pass through all the lines without throwing an error but i just doesn't open the outlook.</p>
  
  <p>Am I missing something to configure on the IIS level?
  Thanks!</p>