Click here to Skip to main content
15,915,772 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
my web page C#.net is work properly in my iis .but when i publish in another server it give errors. Below i mentioned the error



XML
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.Word, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 43:                <add assembly="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 44:                <add assembly="Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 45:                <add assembly="Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/></assemblies>
Line 46:        </compilation>
Line 47:        <!--

Source File: D:\WEBDATA\sanvelsinfo.com\web.config    Line: 45

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Office.Interop.Word, 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.5448; ASP.NET Version:2.0.50727.5456
Posted
Updated 18-Apr-12 1:35am
v2

I do not recommend to use Interop libraries for a web application.
Read this article that suggests also alternative solutions:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757[^]
 
Share this answer
 
In your solution in Visual Studio, right click the dlls mentioned above and set 'Copy Local' = true and then publish.

You can also manually copy the dlls to the IIS to the bin folder of the published site in IIS.
 
Share this answer
 
Comments
Arasu.R 18-Apr-12 7:13am    
I already copied the dll file to bin folder. but it shown the above mentioned error.
bbirajdar 18-Apr-12 8:50am    
Is MS Word installed on your server? If not then install the MS Word on the server or install the Word dll to the GAC. Your website is referencing the dll from the GAC and since it is not able to find it there, you are getting the error.
Hi,


you have to check version of assembly or check that Microsoft.Office.Interop.Word is available in you solution explorer Reference Folder.


Regards,
Saurabh
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900