Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-08-25
6
Medium Priority
?
312 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 2000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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 …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

972 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