问题描述
大家好,
我正在尝试将'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
推荐答案
这篇关于包括ASP.NET 4.0中的Outlook程序集引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!