Microsoft.Office.Interop.Outlo ... [英] Microsoft.Office.Interop.Outlo...

查看:102
本文介绍了Microsoft.Office.Interop.Outlo ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft.Office.Interop.Outlook 2007在VS 2012中的参考



在本地我们创建日历事件它工作正常但服务器端我们创建日历事件它显示这个错误





检索CLSID为{0006F03A-0000-0000-C000-000000000046}的组件的COM类工厂失败,原因如下错误:80040154未注册类(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG))。





我们使用Microsoft.Office.Interop.Outlook版本12.0



有任何想法解决这个问题

Microsoft.Office.Interop.Outlook 2007 Reference in VS 2012

in locally we create calendar event it works fine but server side we create calendar event it show this 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)).


we use Microsoft.Office.Interop.Outlook version 12.0

have any idea to solve this problem

推荐答案

您需要在服务器上安装MSOffice才能使互操作工作。
You need to install MSOffice on your server for the interop to work.


这仅适用于本地计算机,因为它是客户端和服务器,并且网站在您的本地帐户下运行。为了在远程服务器上运行,你需要安装Outlook,而微软不支持它,它不能在asp.net页面上运行。即使您确实安装了Outlook(忽略了合法和许可问题)并且不介意每隔5分钟重新启动IIS,因为它一直挂起,您仍然无法访问客户端的日历,因为您的代码未在客户端的上下文中运行。 br />


基本上,你所做的不会起作用。 Outlook是客户端应用程序,而不是服务器组件。如果您的日历保存在Exchange中,则使用Exchange Web服务(EWS)与它们进行交互,同样如果您正在阅读发送电子邮件,则使用可在asp.net下运行的pop3 \IMAP \SMTP \ EWS组件。您不会按照当前编写的方式运行您的网站,您需要重新设计它。
This only worked on your local machine as it was client and server, and the website was running under your local account. To get this working on a remote server you'll need Outlook installed, which isn't supported by Microsoft, it's not going to work on an asp.net page. Even if you do install Outlook (ignoring the legal and licensing issues) and don't mind restarting IIS every 5 minutes as it keeps hanging, you still can't access the client's calendar as your code is not running under the client's context.

Basically, what you're doing isn't going to work. Outlook is a client application, not a server component. If your calendars are held in Exchange then use the Exchange Web Services (EWS) to interact with them, likewise if you are reading\sending email then use pop3\IMAP\SMTP\EWS components that will work under asp.net. You will not get your site working the way it is currently written, you need to redesign it.


这篇关于Microsoft.Office.Interop.Outlo ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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