C#Outlook - Call被Callee拒绝 [英] C# Outlook - Call Rejected By Callee

查看:416
本文介绍了C#Outlook - Call被Callee拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试通过我的事件注册应用程序使用asp.net/C#将事件添加到Outlook日历。在尝试初始化时(第1行),被调用者错误拒绝了调用。如何解决此问题?

Trying to add an event to Outlook calendar through my event registration app using asp.net/C#. Getting call was rejected by callee error when trying to initialize (line 1). How do I overcome this issue?

错误:
检索CLSID {0006F03A-0000-0000-C000-000000000046}组件的COM类工厂失败由于以下错误:80010001调用被被调用者拒绝(来自HRESULT的异常:0x80010001(RPC_E_CALL_REJECTED))。

Error: "Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))."

Outlook.Application outlookapp = new Outlook.Application();
Outlook.AppointmentItem appt = outlookapp.CreateItem(Outlook.OlItemType.olAppointmentItem) as Outlook.AppointmentItem;
appt.Subject = er.Event.Name;
appt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting;
appt.Location = er.Event.LocationName;
appt.Start = er.Event.StartTime;
appt.End = er.Event.EndTime;
appt.Recipients.ResolveAll();
appt.Display(false);
appt.Save();


推荐答案

首先,您无法从服务作为IIS)。

Firstly, you cannot use Outlook from a service (such as IIS).

其次,即使你的代码工作,你最终创建一个约会,并在服务器机器上本地显示没有任何人看到它。

Secondly, even if your code worked, you'd end up creating an appointment and displaying (!) it locally on the server machine, where there isn't anybody to see it.

创建一个iCal文件并提供一个链接到用户 - ics文件将在客户端机器上使用Outlook打开,用户将能够保存它。

Create an iCal file and provide a link to the user - the ics file will be opened on the client machine using Outlook and the user will be able to save it.

这篇关于C#Outlook - Call被Callee拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆