更新済み 2024年10月20日
共有:

IronWebScraper ライセンスキー for ASP.NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

The problem has been resolved as of IronWebScraper version 2024.3.6.

Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronWebScraper must be licensed for development.

古いバージョンの IronWebScraper (特にバージョン間のもの) の場合2023.4.13以下のコンテンツを日本語に翻訳してください:2024.3.6、以下の箇所に既知のライセンス問題があります:

  • ASP.NETプロジェクト
  • .NET Framework バージョン >= 4.6.2

    Web.configファイルに保存されたキーは、製品によって取得されて使用されることはありません

ワークアラウンド

この問題に対処するために、コード内で ConfigurationManager を使用して Web.config ファイルからライセンスキーを取得し、その後、License.LicenseKey プロパティに適用することをお勧めします。

例:

<configuration>
...
  <appSettings>
    <add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/>
  </appSettings>
...
</configuration>
XML

上記で提供したXMLファイルを用いて、 ConfigurationManager を用いてライセンスキーの値を取得し、 IronWebscraper.License.LicenseKey プロパティに渡すことができます。

using System.Configuration;

string licenseKey = ConfigurationManager.AppSettings ["IronWebScraper.LicenseKey"];

IronWebScraper.License.LicenseKey = licenseKey;
using System.Configuration;

string licenseKey = ConfigurationManager.AppSettings ["IronWebScraper.LicenseKey"];

IronWebScraper.License.LicenseKey = licenseKey;
Imports System.Configuration

Private licenseKey As String = ConfigurationManager.AppSettings ("IronWebScraper.LicenseKey")

IronWebScraper.License.LicenseKey = licenseKey
$vbLabelText   $csharpLabel