包括ASP.NET 4.0中的Outlook程序集引用 [英] Including the Outlook assembly reference in ASP.NET 4.0

查看:98
本文介绍了包括ASP.NET 4.0中的Outlook程序集引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在尝试将'Microsoft.Office.Interop.Outlook'DLL引用添加到我的项目中,虽然它可以正常工作我的开发机器,它不能在实时服务器上运行。页面上转储的错误是:



Hi guys,

I am trying to add the 'Microsoft.Office.Interop.Outlook' DLL reference to my project, and while it works perfectly fine on my development machine, it does not work on the live server. The error dumped on the page is:

Server Error in '/WebPortal' Application.

Could not load file or assembly 'office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. 

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.





这就是我在'system.web'下添加引用的方法web.config文件:





This is how I'm adding the reference under 'system.web' the web.config file:

<assemblies>
    <add assembly="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/>
</assemblies>





我做的时候在两台机器上搜索DLL,它在以下位置出现:





And when I do a search for the DLL on both machines it turns up at the following locations:

Dev machine (working):

C:\Program Files\Reference Assemblies\Microsoft\VSTO40\v4.0.Framework
C:\Program Files\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12
C:\Program Files\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14
C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Office.Tools.Outlook\v4.0_10.0.0.0__b03f5f7f11d50a3a


Live machine (not working):

C:\Program Files\Reference Assemblies\Microsoft\VSTO40\v4.0.Framework
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14
C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Office.Tools.Outlook\v4.0_10.0.0.0__b03f5f7f11d50a3a





我依次检查了每个DLL的确切vesrion数和公钥,并尝试更改web.cfg中的值,但仍然没有快乐。



是否还有其他原因导致服务器无法选择此参考?



非常感谢提前,



Nick



I have checked the exact vesrion numbers and public keys of each of the DLLs in turn, and tried changing the values in the web.cfg, but still no joy.

Is there any other reason why the server would not be picking this reference up?

Many thanks in advance,

Nick

推荐答案

Nick Fisher 会员3485003

不要尝试这样的事情。您不能将outlook用作asp.net Web应用程序的一部分。有几个原因,但不起作用。这并不意味着这样工作!

如果您需要访问IMAP或POP3邮箱,请使用这些协议,或者您甚至可以访问Exchange服务器。对于服务器端目标,使用服务器端方法。 Outlook是一个客户端工具。
Nick Fisher and Member 3485003!
Do not attempt such thing. You can not use outlook as part of an asp.net web application. There are several things why, but it won't work. It is not meant to work like that!
If you need to access IMAP or POP3 mailboxes, use those protocols, or you can even access Exchange server. For server side goals use server side means. Outlook is a client side tool.


Nick,



我有同样的问题。您找到了解决方案吗?
Nick,

Im having the same issue. Did you find the solution?


这篇关于包括ASP.NET 4.0中的Outlook程序集引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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