6

任何熟悉以下错误的人?当我运行我的 webapp 以从本地计算机生成动态 excel 文档时,它工作正常,但是当在服务器上调用同一段代码时,我收到以下错误。似乎这是一个权限问题,因为它适用于我的机器但不适用于服务器,但我不知道从哪里开始以查明问题。非常感谢任何指导/帮助!

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 安装在服务器上,我可以在服务器上打开/保存 Excel 文档。它可能是服务器上的 excel 版本与我的本地机器上的版本吗?如果是这样,我如何确保我在服务器上拥有最新的?

4

4 回答 4

4

除了安装之外,您还需要确保在服务器上激活了该应用程序:

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

有如何做到这一点的详细信息。

于 2010-09-29T12:19:34.177 回答
1

使用 Office 互操作要求您使用的 Office 组件实际安装在服务器上。

于 2008-10-31T17:01:18.213 回答
1

我要拿一个 WAG 说你不能在服务器上放任何旧的 Office 副本并让多个用户通过你的网站访问它。您需要查看在服务器环境中使用 MS Office 的许可限制。

于 2008-10-31T17:09:02.287 回答
0

您在服务器上是否有 Excel 的许可激活副本?它可能适用于您的本地计算机,因为您在本地安装了 Office/Excel。

于 2008-10-31T17:06:33.773 回答