2015-05-28 6 views
0

Я получаю сообщение об ошибке во время развернуты приложений ASP.NET в IIS 7.5 на Windows Server 2008. Я ссылочный Excel 2007, который также присутствует в Windows Server 2008.ошибка ASP.NET IIS при развертывании библиотек EXcel

Здесь мой web.config код

<system.web> 
    <compilation debug="true" targetFramework="4.0"> 
     <assemblies> 
     <add assembly="Microsoft.VisualC, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 

     <add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/> 
     <add assembly="Microsoft.Office.Tools.Excel.v9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
     </assemblies> 
    </compilation> 

Получение сообщение об ошибке

Server Error in '/dev' 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.Tools.Excel.v9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. 

Source Error: 


An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 


Source File: C:\inetpub\wwwroot\dev\web.config Line: 32 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Office.Tools.Excel.v9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded. 
+0

показать код вашего файла web.config? –

+0

Добавлен код файла web.config для справки – AjayR

+0

уверены ли вы, что у вас есть dll excel 2007 в корзине? –

ответ

0

попробовать это решение.

1.Open Visual studio -> visual Studio tools -> Visual studio command prompt 

2.Run following command 
C:\Windows\system32>gacutil /i c:\Microsoft.VisualStudio.Tools.Office.Runtime.v9.0 (Location of dll) 

3. Restart your computer and try. 
+0

На сервере нет Visual Studio, его производственного сервера – AjayR

Смежные вопросы