I have a problem while I put my site on server ... I have a code for upload a Excel file data to SQL database. So I put this assembley into my web config file
<add assembly= "Microsoft.Office.Interop.Excel, version=12.0.0.0, Culture=neutral, publickeytoken= 71e9bce111e9429c "/>
After publishing I site working on local IIS. After puting it on server it gives follwoing error
Server Error in '/ems ' 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.
Pars Er Error message: could not load file or assembly ' Microsoft.Office.Interop.Excel, version=12.0.0.0, Culture=neutral, publickeytoken=71e9bce111e9429c ' or one of its dependencies. The located assembly ' s manifest definition does not match the assembly reference. (Exception from hresult:0x80131040)
Source Error:
Line: <add assembly= "System.Data.DataSetExtensions, version=3.5.0.0, Culture=neutral, publickeytoken= b77a5c561934e089 "/> Line
: <add assembly=" System.Xml.Linq, version=3.5.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "/> Line
: <add assembly=" Microsoft.Office.Interop.Excel, version= 12.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c "/> Line
: </assemblies>
50: </compilation> |
Source File:C:\domains\poojahostingbiz\ankit.poojahosting.biz\wwwroot\ems\web.config
Line :48
Assembly Load Trace:The following information can be helpful to determine why the assembly ' Microsoft.Office.Interop.Excel, version=12.0.0.0, Culture=neutral, publickeytoken=71e9bce111e9429c ' could not to 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]. |
There are two ways to solve the problem: the first:
1. If the system does not have the. Net Framework installed, install it first and proceed to step two directly if it is installed.
2, in "Add or Remove Programs" in the "change" installation of office, the missing parts can be reinstalled. Specific actions such as the following picture:
The following illustration: Add or remove Office features
The following figure: advanced customization of the application
The following illustration: Select Run from My Computer or run all programs from my Computer in the Drop-down menu of the. Net Programmability Support option.
After the installation of the above steps, the Office 2003 PIA is installed in the GAC and can be seen from the following directory: "C:\Windows\assembly", so that the problem described in the title is resolved. Second: Download the patch pack (2007 Microsoft Office System update:redistributable Primary Interop assemblies), at the address: http://www.microsoft.co m/en-us/download/details.aspx?id=18346 Download after installation can