IronXL Lisansını web.config (C#) olarak yapılandırın
Problem IronXL sürümü itibariyle 2024.3.20 çözüldü.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronXL must be licensed for development.
Daha eski IronXL sürümleri, özellikle 2023.4.13 ve 2024.3.20 versiyonları arasında bilinen bir lisanslama sorunu bulunmaktadır:
- ASP.NET projeleri
- .NET Framework sürümü >= 4.6.2
Anahtar, Web.config dosyasında depolanırsa üründe KULLANILMAYACAKTIR.
Geçici Çözüm
Bu sorunu çözmek için, kodda ConfigurationManager kullanarak Web.config dosyasından lisans anahtarını almanız ve ardından License.LicenseKey özelliğine uygulamanız önerilir.
Örnek:
Aşağıda, lisans anahtarını bir Web.config dosyasında nasıl depolayacağınıza dair bir örnek bulunmaktadır:
<configuration>
...
<appSettings>
<add key="IronXL.LicenseKey" value="IronXL-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
Yukarıdaki XML dosyası kurulumu ile lisans anahtarının değerini almak ve IronXL.License.LicenseKey özelliğine ayarlamak için ConfigurationManager kullanabiliriz:
using System.Configuration;
// Retrieve the license key from the Web.config appSettings section
string licenseKey = ConfigurationManager.AppSettings["IronXL.LicenseKey"];
// Apply the retrieved license key to the IronXL component
IronXL.License.LicenseKey = licenseKey;Imports System.Configuration
' Retrieve the license key from the Web.config appSettings section
Dim licenseKey As String = ConfigurationManager.AppSettings("IronXL.LicenseKey")
' Apply the retrieved license key to the IronXL component
IronXL.License.LicenseKey = licenseKeyBu örnekte, ConfigurationManager.AppSettings, IronXL.LicenseKey değerini Web.config içerisinden almak için kullanılır. Alınan lisans anahtarı, IronXL bileşenlerinin düzgün çalışabilmesini sağlamak amacıyla IronXL.License.LicenseKey özelliğine ayarlanır.

Curtis 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.