打开Outlook窗口时显示错误 [英] Error showing when open an outlook window

查看:147
本文介绍了打开Outlook窗口时显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经在我们的MVC项目中添加了以下编码行,用于打开Outlook以及附件。



We have added the following lines of coding in our MVC project for open outlook with an attached file.

Outlook.AppointmentItem tempApp =  (Outlook.AppointmentItem)olook.CreateItem(Outlook.OlItemType.olAppointmentItem);
Outlook.Application objApp = new Outlook.Application();
Outlook.MailItem mail = null;
mail = (Outlook.MailItem)objApp.CreateItem(Outlook.OlItemType.olMailItem);
mail.Attachments.Add((object)@"" + FilePath + "", Outlook.OlAttachmentType.olEmbeddeditem, 1, (object)"Attachment");
mail.Display();





它在本地完美运行,但当它转移到Live服务器时它会显示以下内容错误





it works perfectly by locally,But when it moves to Live server it says the following error

Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).





请帮忙。

谢谢&问候,

soumya



Please help.
Thanks & Regards,
soumya

推荐答案

这只是意味着你的实时服务器上没有安装Outlook,这本身并不是件坏事。



有一个可以部署到服务器的软件包,允许应用程序访问核心MAPI对象。



搜索在您最喜爱的搜索引擎上找到MAPI CDO,找到合适的Windows / Exchange版本。



祝你好运。
That simply means that Outlook is not installed on your live server, which is not a bad thing per se.

There's a package that can be deployed to servers allowing applications to access core MAPI objects.

Search for "MAPI CDO" on your favorite search engine, and find the suitable version for your Windows/Exchange.

Good luck.


这篇关于打开Outlook窗口时显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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