Solved

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

Posted on 2010-08-25
6
307 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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