title: Send outlook appointment through asp.net error HRESULT: 0x80004004
body: <p>I am trying to send an outlook appointment through code. My code is posted below. When I run it on the server with IIS 6 and an app pool under a domain account identity, it throws this error. I have tried changing various settings on the server and none worked. Outlook 2007 is installed. I have even made the domain account a local admin. Please help!</p>
  
  <blockquote>
    <p>Description: An unhandled exception
    occurred during the execution of the
    current web request. Please review the
    stack trace for more information about
    the error and where it originated in
    the code.</p>
    
    <p>Exception Details:
    System.Runtime.InteropServices.COMException:
    Operation aborted (Exception from
    HRESULT: 0x80004004 (E_ABORT))</p>
    
    <p>Line 201:            objAppt.Send();</p>
  </blockquote>
  
  <p>Code below:</p>
  
  <pre><code>Microsoft.Office.Interop.Outlook.Application objOL 
      = new Microsoft.Office.Interop.Outlook.Application();
  Microsoft.Office.Interop.Outlook.AppointmentItem objAppt 
      = (Microsoft.Office.Interop.Outlook.AppointmentItem)objOL
          .CreateItem
              (Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
  objAppt.Start = startTime;//datetime
  objAppt.End = endTime;//datetime
  objAppt.Subject = subject;
  objAppt.Body = body;
  objAppt.Location = location;
  objAppt.MeetingStatus 
      = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;
  objAppt.RequiredAttendees = "test@test.com";
  objAppt.Send();
  objAppt = null;
  objOL = null;
  </code></pre>