IronBarcode Lisans Kurulumu web.config içinde
Bu sorun IronBarcode'un 2024.3.2 sürümünde çözüldü.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronBarcode must be licensed for development.
Eski IronBarcode sürümleri için, özellikle 2023.4.1 ve 2024.3.2 sürümleri arasında, bilinen bir lisanslama sorunu vardır:
- ASP.NET projeleri
- .NET Framework sürümü >= 4.6.2
Ürün, Web.config dosyasında saklanan anahtarı KULLANMAYACAK ve kullanmayacaktır.
Geçici Çözüm
Bu sorunu çözmek için, lisans anahtarını kodda ConfigurationManager kullanarak Web.config dosyasından almanız ve ardından License.LicenseKey özelliğine uygulamanız önerilir.
Örnek:
<configuration>
...
<appSettings>
<add key="IronBarCode.LicenseKey" value="IRONBARCODE-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
Yukarıda sağlanan XML dosyası ile, lisans anahtar değerini almak ve IronBarCode.License.LicenseKey özelliğine aktarmak için ConfigurationManager kullanabiliriz.
using System.Configuration;
// Retrieve the license key from appSettings in the Web.config file
string licenseKey = ConfigurationManager.AppSettings["IronBarCode.LicenseKey"];
// Apply the retrieved license key to the IronBarCode LicenseKey property
IronBarCode.License.LicenseKey = licenseKey;Imports System.Configuration
' Retrieve the license key from appSettings in the Web.config file
Private licenseKey As String = ConfigurationManager.AppSettings("IronBarCode.LicenseKey")
' Apply the retrieved license key to the IronBarCode LicenseKey property
IronBarCode.License.LicenseKey = licenseKeyImports System.Configuration
' Retrieve the license key from appSettings in the Web.config file
Private licenseKey As String = ConfigurationManager.AppSettings("IronBarCode.LicenseKey")
' Apply the retrieved license key to the IronBarCode LicenseKey property
IronBarCode.License.LicenseKey = licenseKeyCurtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.