Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET2.0 C# COM Excel Interop , +
I am using Microsoft Excel 12.0 Object Library to use excel formula manipulation from My Site developed on .Net framework 2.0.
 
I have Office 2007 installed on my local machine and it works fine.
 
But whenever i deploy the site on to a server it shows the following error
,
The file '/forum/default.aspx' has not been pre-compiled, and cannot be requested. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.Web.HttpException: The file '/forum/default.aspx' has not been pre-compiled, and cannot be requested.
Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
Stack Trace: 
 
[HttpException (0x80004005): The file '/forum/default.aspx' has not been pre-compiled, and cannot be requested.]
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +826
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +116
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +175
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +503
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263
 
what else i will have to do to get it working on server? and what i might be missing while building relaese for the deployment server. I am not doing anything extra for COM object while building release. what am i supposed to do?
This is my first time working with a COM object library.
Posted 22-Nov-11 20:28pm
Husmig405

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Office interop is not intended to be used on servers and requires the installation of the Office Suite on that server.
 
You are better off using server side 3rd party components for Excel file generation.
 
Try this : http://epplus.codeplex.com/[^]
  Permalink  
Comments
Husmig at 23-Nov-11 1:48am
   
Thanks for your quick response.
 
Does it need any other installation of assemblies or do i need to register the assemblies in GAC or just office installation is enough for the application to work?
 
And about epplus .... does it support the financial formulas like "PRICE", "YIELD", "YEARFRAC"?
Mehdi Gholam at 23-Nov-11 1:58am
   
No dependencies.
 
It supports all the formulas in creation mode (you can write any formula in a cell) the viewer i.e. Excel will handle the computations.

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

  Print Answers RSS
0 OriginalGriff 7,130
1 DamithSL 5,089
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,647
4 Kornfeld Eliyahu Peter 4,409


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 23 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100