title: Access Denied OutLook DCOM
body: <p>I'm trying an ASP.NET App and I have a problem with OutLook.</p>
  
  <p>Code behind :</p>
  
  <pre><code>OutlookApplication = new Application();
  NameSpace nameSpace = OutlookApplication.GetNamespace("MAPI");
  nameSpace.Logon("", "", missing, missing);
  nameSpace = null;
  </code></pre>
  
  <p>When I play the app with Visual Studio it's ok.</p>
  
  <p>When I play the app with IIS then :</p>
  
  <blockquote>
    <p>System.UnauthorizedAccessException: Retrieving the COM class factory for >component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the >following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 >(E_ACCESSDENIED)).</p>
  </blockquote>
  
  <p>I already tried to change DCOM Configuration for "OutLook Message Attachment" with :</p>
  
  <p>Proprieties -> Identity -> Execute user</p>
  
  <p>Proprieties -> Security -> all kind of acces autorized for "everybody".</p>
  
  <p>NB : I have no problem with others Office programm (Excel and Word).</p>