IronPrint Lisans Yapılandırma Sorun Giderme

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

Sorun çözüldü IronPrint versiyonu 2024.3.6 itibarıyla.

# This shell output shows an unhandled exception error due to missing license for IronPrint.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronPrint must be licensed for development.
# This shell output shows an unhandled exception error due to missing license for IronPrint.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronPrint must be licensed for development.
SHELL

Eski IronPrint sürümleri, özellikle 2024.3.6 sürümünden önce yayınlananlar için, bilinen bir lisanslama sorunu bulunmaktadır:

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

Bir Web.config dosyasında saklanan anahtar KULLANILMAYACAK ve ürün tarafından alınmayacaktır.

Geçici Çözüm

Bu sorunu çözmek için, lisans anahtarını Web.config dosyasından ConfigurationManager kullanarak koddaki almanız ve ardından License.LicenseKey özelliğine uygulamanız önerilir.

Örnek:

<configuration>
  ...
  <appSettings>
    <add key="IronPrint.LicenseKey" value="IRONPRINT.MYLICENSE.KEY.1EF01"/>
  </appSettings>
  ...
</configuration>
<configuration>
  ...
  <appSettings>
    <add key="IronPrint.LicenseKey" value="IRONPRINT.MYLICENSE.KEY.1EF01"/>
  </appSettings>
  ...
</configuration>
XML

Yukarıda sağlanan XML dosyası ile, lisans anahtarını ConfigurationManager kullanarak alabilir ve IronPrint.License.LicenseKey özelliğine iletebiliriz.

using System;
using System.Configuration;

namespace IronPrintLicenseSetup
{
    class Program
    {
        static void Main()
        {
            // Retrieve the license key from the appSettings section of the Web.config file.
            string licenseKey = ConfigurationManager.AppSettings["IronPrint.LicenseKey"];

            // Apply the retrieved license key to the IronPrint's LicenseKey property.
            IronPrint.License.LicenseKey = licenseKey;

            // Notify user that the license key has been applied.
            Console.WriteLine("License Key has been applied successfully.");
        }
    }
}
using System;
using System.Configuration;

namespace IronPrintLicenseSetup
{
    class Program
    {
        static void Main()
        {
            // Retrieve the license key from the appSettings section of the Web.config file.
            string licenseKey = ConfigurationManager.AppSettings["IronPrint.LicenseKey"];

            // Apply the retrieved license key to the IronPrint's LicenseKey property.
            IronPrint.License.LicenseKey = licenseKey;

            // Notify user that the license key has been applied.
            Console.WriteLine("License Key has been applied successfully.");
        }
    }
}
Imports System
Imports System.Configuration

Namespace IronPrintLicenseSetup
	Friend Class Program
		Shared Sub Main()
			' Retrieve the license key from the appSettings section of the Web.config file.
			Dim licenseKey As String = ConfigurationManager.AppSettings("IronPrint.LicenseKey")

			' Apply the retrieved license key to the IronPrint's LicenseKey property.
			IronPrint.License.LicenseKey = licenseKey

			' Notify user that the license key has been applied.
			Console.WriteLine("License Key has been applied successfully.")
		End Sub
	End Class
End Namespace
$vbLabelText   $csharpLabel

Yukarıdaki örnekte, ConfigurationManager.AppSettings lisans anahtarını doğrudan Web.config 'den almak için kullanılmaktadır. Anahtar daha sonra IronPrint bileşeni için LicenseKey olarak ayarlanır ve bu da uygulamanın doğru çalışması için gerekli lisansa sahip olmasını sağlar.

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 39,267 | Sürüm: 2026.4 just released
Still Scrolling Icon

Hala Kaydiriyor musunuz?

Hızlı bir kanit mi istiyorsunuz? PM > Install-Package IronPrint
bir örnek calistirin belgenizin yaziciya gitmesini izleyin.