2013-04-09 102 views
1

我已经在安装了Windows Server 2008 R2,iis 7和.net framework 3.5.1的虚拟机上部署了一个网站。无法加载文件或程序集Microsoft.Office.Interop.Excel

我一直在收到以下错误。

========================================

Server Error in '/' Application. 

Configuration Error 

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified. 

Source Error: 


Line 46:    <add assembly="stdole, Version=7.0.3300.0, Culture=neutral , PublicKeyToken=B03F5F7F11D50A3A"/> 
Line 47:    <!--<add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>--> 
Line 48:    <add assembly="Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /></assemblies> 
Line 49:  </compilation> 
Line 50:  

Source File: C:\TFareDemo\web.config Line: 48 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' could not be loaded. 


WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

Version Information: Microsoft .NET Framework Version:2.0.50727.5466; ASP.NET Version:2.0.50727.5456 

================================================= ======== 该应用程序具有生成excel报告的功能。我还没有安装Office,因此我一直无法启动网站。

  1. 我试过很多东西,比如安装.net framework 1.1 redistributable package。
  2. 我还安装了Office Open XML,因为我在某处读取该问题可能会得到解决。

请帮我这个。 我的网站是使用vs 2005开发的,我没有在上面提到的虚拟机上安装vs 2005。

回答

4

我还没有安装Office

您需要执行您的Excel处理代码在计算机上安装微软Office(或至少Excel)中。如果没有Excel,它不会神奇地工作。

+0

这是一台服务器机器,所以我不会被允许在服务器机器上安装办公室。我希望它在没有安装Office的情况下工作。是否有其他解决方案?我也在VM上安装了OpenOffice。 – kavitha 2013-04-09 05:34:34

+0

如果你想使用Excel,你需要安装Excel。你可以使用Excel的替代品,然后你需要重写你的程序来使用它们并将它们安装到你的服务器上。 – nvoigt 2013-04-09 06:38:36

相关问题