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
Solved

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

Posted on 2010-08-25
6
305 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
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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