Outlook Web服务调用
|
我正在尝试设置一个允许用户通过我的Web服务-
string subject, DateTime startTime, DateTime dueDate, string body, List<string> recipients, string owner
,然后创建一个Task
。这在我的机器上工作正常,但是在Windows 2003上,我不断收到不同的错误。目前我正在-Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
我正在使用一个具有电子邮件访问权限的帐户,并且该帐户已在该框中运行。我不确定这是否是最好的方法,但这就是我所得到的。而且请客气-我是.NET Web开发人员,无论如何都不是Outlook程序员。
我的代码看起来像这样-
Outlook task = new Outlook();
TaskItem taskItem = (TaskItem)_application.CreateItem(OlItemType.olTaskItem);
taskItem.Subject = subject;
taskItem.StartDate = startTime;
taskItem.DueDate = dueDate;
taskItem.Body = body;
foreach (string recipient in recipients)
{
taskItem.Recipients.Add(recipient);
}
taskItem.Owner = owner;
taskItem.Assign();
task.EntryId = taskItem.EntryID;
if (taskItem.Saved)
{
task.Successful = true;
}
return task;
没有找到相关结果
已邀请:
3 个回复
窝头菊
联海
响摔衅幸