'License expired' error when dynamically generating Excel docs in ASP.NET
Asked Answered
S

4

7

Anyone familiar with error below? When I run my webapp to generate a dynamic excel doc from my local machine it works fine but when the same piece of code is invoked on the server I get the below error. It seems like it's a permissions issues since it works on my machine but not the server but I don't know where to start in order to pinpoint the problem. Any guidance/help is greatly appreciated!

Server Error in '/' Application.
--------------------------------------------------------------------------------

This command is unavailable because the license to use this application has expired. 
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.Runtime.InteropServices.COMException: This command is unavailable because the license to use this application has expired.

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: 


[COMException (0x800a03ec): This command is unavailable because the license to use this application has expired.]
   Microsoft.Office.Interop.Excel.Workbooks.Add(Object Template) +0
   PaymentsReport.Page_Load(Object sender, EventArgs e) +70
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Office/Excel is installed on the server and I can open/save excel docs on the server. Could it be the version of excel on the server vs. my local machine? If so how can I make sure I have the latest on the server?

Silent answered 31/10, 2008 at 16:57 Comment(0)
W
2

Using Office Interop requires that the Office components you're using actually be installed on the server.

Whiteeye answered 31/10, 2008 at 17:1 Comment(0)
P
5

Apart from being installed, you need to make sure the application is activated on the server:

http://support.microsoft.com/kb/294973

Has details on how to do this.

Purposely answered 29/9, 2010 at 12:19 Comment(0)
W
2

Using Office Interop requires that the Office components you're using actually be installed on the server.

Whiteeye answered 31/10, 2008 at 17:1 Comment(0)
O
1

I'm gonna take a WAG and say that you just can't slap any old copy of Office on a server and let multiple users access it via your website. You need to look at the licensing restrictions for using MS office in a server environment.

Outgoing answered 31/10, 2008 at 17:9 Comment(0)
H
0

Do you have a licensed, activated copy of Excel on the server? It probably works on your local machine because you have Office/Excel installed locally.

Halting answered 31/10, 2008 at 17:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.