ASP.NETでExcelドキュメントを動的に生成する際の「ライセンスの期限切れ」エラー

StackOverflow https://stackoverflow.com/questions/254207

  •  05-07-2019
  •  | 
  •  

質問

以下のエラーに精通している人はいますか? 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コピーを平手打ちして、複数のユーザーにWebサイト経由でアクセスさせることはできないと言います。サーバー環境でMS officeを使用するには、ライセンスの制限を確認する必要があります。

ライセンスを取得した、アクティブ化されたExcelのコピーがサーバーにありますか? Office / Excelがローカルにインストールされているため、おそらくローカルマシンで動作します。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top