Solved

Error running asp pages when an assembly is added referencing MS Office

Posted on 2010-08-25
6
306 Views
Last Modified: 2012-05-10
Hi,

I have an asp.net application which uses .Net Framework 4.0 with IIS 6.0 and Windows Server 2003 on the host server. I've added the reference shown in the attached code, and since adding them I get this error at runtime:
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.

Maybe I need to add a reference in the assembly in the GAC in .Net Framework 4.0?

I would be grateful for any advice.

Louise

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

<assemblies>
        <add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
			</assemblies>

Open in new window

0
Comment
Question by:louise001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:thaytu888888
ID: 33519965
- Add that DLL into GAC (C:/Windows/assembly)
0
 

Author Comment

by:louise001
ID: 33520106
Thanks for responding. It's already there in C:\Windows\Assembly, with the same public key token.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 33520143
is Excel fully installed on the server?
using Office automation on a web server is not recommended. you should use something like http://www.aspose.com/categories/.net-components/aspose.cells-for-.net/default.aspx
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:louise001
ID: 33520298
Hi,
Yes, Excel is installed on the server but Office 2003 not 2007. I'll change the version and see if that fixes it. In the meantime could you advise a little more about Office using automation on a webserver? In code in my application I want to create Outlook messages with to and from addresses and the subject pre-set; the user would then modify as required and send him/herself. I also want to create a Word file in code which would then be saved on our network and from time to time it would be updated in Word or by code. Does that sound do-able? It's for use inside my company by only a handful of people.
Thanks,
Louise
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 33520316
0
 

Author Closing Comment

by:louise001
ID: 33521816
The issue was resolved by installing the same version of Office as referenced in the assemblies element in web.config

Thanks also for link to MS page on Office automation in asp.net
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question