IronWebScraper-Lizenzschlüssel für ASP.NET
Das Problem wurde behoben mit der IronWebScraper Version 2024.3.6.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronWebScraper must be licensed for development.
Für ältere IronWebScraper-Versionen, insbesondere zwischen den Versionen 2023.4.13 und 2024.3.6, gibt es ein bekanntes Lizenzierungsproblem in:
- ASP.NET-Projekten
- .NET Framework Version >= 4.6.2
Der im Web.config-Datei gespeicherte Schlüssel wird vom Produkt NICHT erkannt und verwendet.
Problemumgehung
Um dieses Problem zu beheben, wird empfohlen, den Lizenzschlüssel aus der Web.config-Datei mit ConfigurationManager im Code abzurufen und ihn dann auf die License.LicenseKey-Eigenschaft anzuwenden.
Beispiel:
<configuration>
...
<appSettings>
<add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
<configuration>
...
<appSettings>
<add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
Mit der oben bereitgestellten XML-Datei können wir ConfigurationManager verwenden, um den Lizenzschlüsselwert abzurufen und ihn an die IronWebScraper.License.LicenseKey-Eigenschaft zu übergeben.
// Retrieve the license key from the appSettings section of the Web.config file.
string licenseKey = ConfigurationManager.AppSettings["IronWebScraper.LicenseKey"];
// Assign the license key to the IronWebScraper's LicenseKey property.
IronWebScraper.License.LicenseKey = licenseKey;
// Retrieve the license key from the appSettings section of the Web.config file.
string licenseKey = ConfigurationManager.AppSettings["IronWebScraper.LicenseKey"];
// Assign the license key to the IronWebScraper's LicenseKey property.
IronWebScraper.License.LicenseKey = licenseKey;
' Retrieve the license key from the appSettings section of the Web.config file.
Dim licenseKey As String = ConfigurationManager.AppSettings("IronWebScraper.LicenseKey")
' Assign the license key to the IronWebScraper's LicenseKey property.
IronWebScraper.License.LicenseKey = licenseKey

