Korzystanie z kluczy licencyjnych IronPrint

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

Jak uzyskać klucz licencyjny

Dodanie klucza licencyjnego IronPrint pozwala na wdrożenie projektu na żywo bez ograniczeń i znaków wodnych.

Tutaj możesz kupić klucz licencyjny lub zarejestrować się, aby otrzymać bezpłatny 30-dniowy okres próbny.


Krok 1: Pobierz najnowszą wersję IronPrint

Krok 2: Zastosuj swój klucz licencyjny

Ustaw licencję za pomocą kodu

Dodaj ten kod do sekcji startup swojej aplikacji, przed użyciem IronPrint. Upewnij się, że zamieniasz YOUR_LICENSE_KEY na swój aktualny klucz licencyjny IronPrint.

using IronPrint;

class Program
{
    static void Main()
    {
        // Apply the IronPrint license key at the start of your application
        IronPrint.LicenseKey = "YOUR_LICENSE_KEY";

        // Verify that the license key is applied
        if (IronPrint.License.IsLicensed)
        {
            Console.WriteLine("License is applied successfully.");
        }
        else
        {
            Console.WriteLine("Failed to apply the license.");
        }

        // Start using IronPrint features
        // Your code logic goes here
    }
}
using IronPrint;

class Program
{
    static void Main()
    {
        // Apply the IronPrint license key at the start of your application
        IronPrint.LicenseKey = "YOUR_LICENSE_KEY";

        // Verify that the license key is applied
        if (IronPrint.License.IsLicensed)
        {
            Console.WriteLine("License is applied successfully.");
        }
        else
        {
            Console.WriteLine("Failed to apply the license.");
        }

        // Start using IronPrint features
        // Your code logic goes here
    }
}
Imports IronPrint

Friend Class Program
	Shared Sub Main()
		' Apply the IronPrint license key at the start of your application
		IronPrint.LicenseKey = "YOUR_LICENSE_KEY"

		' Verify that the license key is applied
		If IronPrint.License.IsLicensed Then
			Console.WriteLine("License is applied successfully.")
		Else
			Console.WriteLine("Failed to apply the license.")
		End If

		' Start using IronPrint features
		' Your code logic goes here
	End Sub
End Class
$vbLabelText   $csharpLabel

Ustaw licencję za pomocą pliku Web.Config lub App.Config

Aby zastosować klucz globalnie w aplikacji przy użyciu pliku Web.Config lub App.Config, dodaj następujący klucz do pliku konfiguracyjnego w sekcji appSettings.

<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

W przypadku wersji IronPrint wydanej przed wersją 2024.3.6 występuje znany problem licencyjny w projektach:

  • projektach ASP.NET
  • wersjach .NET Framework >= 4.6.2

Klucz przechowywany w pliku Web.config NIE jest przechwytywany i używany przez produkt. Aby dowiedzieć się więcej, zapoznaj się z artykułem dotyczącym rozwiązywania problemów "Ustawianie klucza licencyjnego w pliku Web.config".

Upewnij się, że IronPrint.License.IsLicensed zwraca true, aby potwierdzić, że Twoja aplikacja jest prawidłowo licencjonowana.


Ustaw klucz licencyjny za pomocą pliku appsettings.json w .NET Core

Aby zastosować klucz globalnie do aplikacji .NET Core:

  • Dodaj plik JSON do swojego projektu o nazwie appsettings.json w katalogu głównym projektu.
  • Dodaj klucz "IronPrint.LicenseKey" do pliku konfiguracyjnego JSON. Wartością powinna być Twoja licencja.
  • Upewnij się, że właściwości pliku zawierają opcję Kopiuj do katalogu wyjściowego: Zawsze kopiuj.

Plik: appsettings.json

{
    "IronPrint.LicenseKey": "IRONPRINT.MYLICENSE.KEY.1EF01"
}

Krok 3: Zweryfikuj swój klucz licencyjny

Sprawdź zainstalowany klucz licencyjny

Aby sprawdzić, czy klucz licencyjny został poprawnie zastosowany, można sprawdzić właściwość IsLicensed. Użyj poniższego fragmentu kodu:

using IronPrint;

class LicenseCheck
{
    static void Main()
    {
        // Check if the license is applied
        bool isLicensed = IronPrint.License.IsLicensed;
        Console.WriteLine(isLicensed ? "License applied." : "License not applied.");
    }
}
using IronPrint;

class LicenseCheck
{
    static void Main()
    {
        // Check if the license is applied
        bool isLicensed = IronPrint.License.IsLicensed;
        Console.WriteLine(isLicensed ? "License applied." : "License not applied.");
    }
}
Imports IronPrint

Friend Class LicenseCheck
	Shared Sub Main()
		' Check if the license is applied
		Dim isLicensed As Boolean = IronPrint.License.IsLicensed
		Console.WriteLine(If(isLicensed, "License applied.", "License not applied."))
	End Sub
End Class
$vbLabelText   $csharpLabel

Zweryfikuj klucz licencyjny

Aby sprawdzić ważność licencji lub klucza próbnego, możesz użyć poniższego fragmentu kodu:

using IronPrint;

class ValidateLicense
{
    static void Main()
    {
        // Validate license or trial key
        bool isValid = IronPrint.License.IsValid;
        Console.WriteLine(isValid ? "License key is valid." : "License key is invalid.");
    }
}
using IronPrint;

class ValidateLicense
{
    static void Main()
    {
        // Validate license or trial key
        bool isValid = IronPrint.License.IsValid;
        Console.WriteLine(isValid ? "License key is valid." : "License key is invalid.");
    }
}
Imports IronPrint

Friend Class ValidateLicense
	Shared Sub Main()
		' Validate license or trial key
		Dim isValid As Boolean = IronPrint.License.IsValid
		Console.WriteLine(If(isValid, "License key is valid.", "License key is invalid."))
	End Sub
End Class
$vbLabelText   $csharpLabel

Jeśli wartość zwracana wynosi True, oznacza to, że klucz jest prawidłowy i można kontynuować korzystanie z IronPrint. Jeśli jednak wartość zwracana wynosi False, oznacza to, że klucz jest nieprawidłowy.


Krok 4: Rozpoczęcie pracy nad projektem

Aby rozpocząć pracę z IronPrint, zdecydowanie zalecamy zapoznanie się z naszym obszernym samouczkiem "Pierwsze kroki z IronPrint". Ten samouczek zawiera szczegółowe instrukcje i przykłady, które pomogą Ci opanować podstawy korzystania z IronPrint.


Masz pytania lub potrzebujesz pomocy?

Aby korzystać z IronPrint w rzeczywistych projektach, potrzebny jest płatny lub próbny klucz licencyjny, który można uzyskać poprzez zakup licencji. Licencję Trial można uzyskać, klikając ten link.

Aby uzyskać obszerny zbiór przykładów kodu, samouczków, szczegółów dotyczących licencji oraz obszernej dokumentacji, odwiedź sekcję IronPrint na naszej stronie internetowej.

Jeśli masz jakiekolwiek pytania, skontaktuj się z support@ironsoftware.com.

Często Zadawane Pytania

How can I obtain a license key for my C# print application?

You can purchase a license key from the IronPrint licensing page or sign up for a free 30-day trial key to deploy your project live without restrictions.

What are the steps to apply a license key in C#?

To apply a license key in C#, use the code IronPrint.LicenseKey = "YOUR_LICENSE_KEY"; at the startup of your application. Replace "YOUR_LICENSE_KEY" with your actual license key.

How do I set a license key in Web.Config or App.Config?

Add your license key to the appSettings section of your config file using: .

What should I do if my license key is not being applied in Web.config?

Ensure you are using a version released after 2024.3.6. If issues persist, refer to the 'Setting License Key in Web.config' troubleshooting article on the IronPrint website.

How can I apply a license key in a .NET Core application?

In a .NET Core application, add an appsettings.json file with a key-value pair: { "IronPrint.LicenseKey": "YOUR_LICENSE_KEY" } and set its properties to 'Copy to Output Directory: Copy always'.

How can I verify if my IronPrint license key is applied correctly?

Use the code snippet bool isLicensed = IronPrint.License.IsLicensed; to check if your license key is correctly applied. A return value of true indicates successful application.

How do I validate the validity of my IronPrint license key?

To validate your license key, use bool isValid = IronPrint.License.IsValid;. If it returns true, your key is valid.

Where can I find resources to get started with IronPrint?

Visit the IronPrint website for comprehensive tutorials, code examples, and extensive documentation to help you get started with using IronPrint in your projects.

What should I do if I need support with IronPrint?

For support, you can email or explore the IronPrint section on the Iron Software website for additional resources and documentation.

Is IronPrint compatible with .NET 10, and how does licensing work in that environment?

Yes — IronPrint supports .NET 10, along with .NET 9, 8, 7, 6, and .NET Core 3.1+, as well as .NET Framework 4.6.2+. Licensing works the same way in .NET 10: set your license key via code (IronPrint.LicenseKey = "YOUR_LICENSE_KEY";), or use configuration (appsettings.json) to apply it globally. The IsLicensed property can be used to verify successful application. Features and compatibility with .NET 10 are documented in the Features section. ([ironsoftware.com](https://ironsoftware.com/csharp/print/features/?utm_source=openai))

Curtis Chau
Autor tekstów technicznych

Curtis Chau posiada tytuł licencjata z informatyki (Uniwersytet Carleton) i specjalizuje się w front-endowym rozwoju, z ekspertką w Node.js, TypeScript, JavaScript i React. Pasjonuje się tworzeniem intuicyjnych i estetycznie przyjemnych interfejsów użytkownika, Curtis cieszy się pracą z nowoczesnymi frameworkami i tworzeniem dobrze zorganizowanych, atrakcyjnych wizualnie podrę...

Czytaj więcej
Gotowy, aby rozpocząć?
Nuget Pliki do pobrania 38,948 | Wersja: 2026.4 just released
Still Scrolling Icon

Wciąż przewijasz?

Czy chcesz szybko dowodu? PM > Install-Package IronPrint
uruchom próbkę obserwuj, jak twój dokument trafia do drukarki.