ASP.NET için IronWebScraper Lisans Anahtarı

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

Sorun, IronWebScraper sürümü 2024.3.6 itibarıyla çözüldü.

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

Daha eski IronWebScraper sürümleri, özellikle 2023.4.13 ile 2024.3.6 arasındaki sürümler için, bilinen bir lisanslama sorunu bulunmaktadır:

  • ASP.NET projeleri
  • .NET Framework sürümü >= 4.6.2

Bir Web.config dosyasında depolanan anahtar, ürün tarafından DEĞERLENDİRİLMEYECEKTİR ve kullanılmayacaktır.

Geçici Çözüm

Bu sorunu çözmek için, kodda ConfigurationManager kullanarak lisans anahtarını Web.config dosyasından almak ve ardından License.LicenseKey özelliğine uygulamak önerilir.

Örnek:

<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>
XML

Yukarıda verilen XML dosyası ile, lisans anahtar değerini almak ve IronWebScraper.License.LicenseKey özelliğine aktarmak için ConfigurationManager kullanabiliriz.

// 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
$vbLabelText   $csharpLabel
Curtis Chau
Teknik Yazar

Curtis Chau, Bilgisayar Bilimleri alanında lisans derecesine sahiptir (Carleton Üniversitesi) ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirme üzerine uzmanlaşmıştır. Kullanıcı dostu ve estetik açıdan hoş arayüzler tasarlamaya tutkuyla bağlı olan Curtis, modern çerç...

Daha Fazlasını Oku
Başlamaya Hazır mısınız?
Nuget İndirmeler 134,614 | Sürüm: 2026.4 just released
Still Scrolling Icon

Hala Kaydiriyor musunuz?

Hızlı bir kanit mi istiyorsunuz? PM > Install-Package IronWebScraper
bir örneği çalıştır hedef sitenizi yapılandırılmış veri haline getirin.