2008-10-31 9 views
5

¿Alguien familiarizado con el error a continuación? Cuando ejecuto mi aplicación web para generar un documento dinámico de Excel desde mi máquina local funciona bien, pero cuando se invoca el mismo código en el servidor, aparece el siguiente error. Parece que se trata de un problema de permisos, ya que funciona en mi máquina, pero no en el servidor, pero no sé por dónde empezar para identificar el problema. ¡Cualquier guía/ayuda es muy apreciada!Error de 'Licencia caducada' al generar dinámicamente documentos de Excel en ASP.NET

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 

Oficina/Excel está instalado en el servidor y que se puede abrir/guardar documentos de Excel en el servidor. ¿Podría ser la versión de Excel en el servidor frente a mi máquina local? Si es así, ¿cómo puedo asegurarme de tener lo último en el servidor?

Respuesta

1

El uso de Office Interop requiere que los componentes de Office que está utilizando realmente estén instalados en el servidor.

0

¿Tiene una copia de Excel con licencia y activada en el servidor? Probablemente funcione en su máquina local porque tiene Office/Excel instalado localmente.

1

Voy a tomar un WAG y decir que no se puede copiar una copia antigua de Office en un servidor y permitir que varios usuarios accedan a ella a través de su sitio web. Debe observar las restricciones de licencia para usar MS Office en un entorno de servidor.

Cuestiones relacionadas