任何熟悉以下错误的人?当我运行我的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版本与我的本地机器吗?如果是这样,我怎样才能确保我在服务器上有最新版本?

有帮助吗?

解决方案

使用Office Interop要求您正在使用的Office组件实际安装在服务器上。

其他提示

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

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

有关于如何执行此操作的详细信息。

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

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top