IronOCRライセンスの設定をweb.configで行う
The problem has been resolved as of IronZIP version 2024.3.3.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronZip must be licensed for development.
旧バージョンのIronZIP (特にバージョン2024.3.3、以下の箇所に既知のライセンス問題があります:
- ASP.NETプロジェクト
-
.NET Framework バージョン >= 4.6.2
Web.config
ファイルに保存されたキーは、製品によって取得されて使用されることはありません。
ワークアラウンド
この問題に対処するために、コード内で ConfigurationManager を使用して Web.config
ファイルからライセンスキーを取得し、その後、License.LicenseKey プロパティに適用することをお勧めします。
例:
<configuration>
...
<appSettings>
<add key="IronZip.LicenseKey" value="IRONZIP.MYLICENSE.KEY.1EF01"/>
</appSettings>
...
</configuration>
上記で提供された XML ファイルを使用して、ConfigurationManager を使用してライセンスキーの値を取得し、IronZIP.License.LicenseKey プロパティに渡すことができます。
using System.Configuration;
string licenseKey = ConfigurationManager.AppSettings ["IronZip.LicenseKey"];
IronZip.License.LicenseKey = licenseKey;
using System.Configuration;
string licenseKey = ConfigurationManager.AppSettings ["IronZip.LicenseKey"];
IronZip.License.LicenseKey = licenseKey;
Imports System.Configuration
Private licenseKey As String = ConfigurationManager.AppSettings ("IronZip.LicenseKey")
IronZip.License.LicenseKey = licenseKey