Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

1 solution

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/[^]
 
Share this answer
 
Comments
Husmig 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900