IronPrintライセンスキーの使用
ライセンス キーの取得方法
IronPrint ライセンス キーを追加すると、制限や透かしなしでプロジェクトをライブで展開できます。
こちらからライセンス キーを購入したり、 30 日間の無料試用キーにサインアップしたりできます。
ステップ1:IronPrintの最新バージョンをダウンロードする
ステップ 2: ライセンス キーを適用する
コードを使用してライセンスを設定する
IronPrint が使用される前に、このコードをアプリケーションの起動時に追加します。 YOUR_LICENSE_KEYを実際の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 ClassWeb.Config または App.Config を使用してライセンスを設定する
Web.Config または App.Config を使用してアプリケーションにキーをグローバルに適用するには、次のキーを 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>プロジェクトで2024.3.6より前にリリースされた IronPrint バージョンには、既知のライセンスの問題があります。
- ASP.NETプロジェクト
- .NET Frameworkバージョン >= 4.6.2
Web.config ファイルに保存されたキーは、製品によって 認識されず、使用されません。 詳細については、" Web.config でライセンス キーを設定する"トラブルシューティング記事を参照してください。
アプリケーションのライセンスが正しく付与されていることを確認するには、 IronPrint.License.IsLicensed true返すことを確認します。
.NET Core appsettings.jsonファイルを使用してライセンスキーを設定する
.NET Core アプリケーションにキーをグローバルに適用するには:
- プロジェクトのルートディレクトリにJSONファイル
appsettings.jsonを追加します。 - JSON設定ファイルに"IronPrint.LicenseKey"キーを追加します。値はライセンスキーにする必要があります。
- ファイルのプロパティに 出力ディレクトリにコピー: 常にコピー を含めることを確認してください。
ファイル: appsettings.json
{
"IronPrint.LicenseKey": "IRONPRINT.MYLICENSE.KEY.1EF01"
}ステップ 3: ライセンス キーを検証する
インストールされたライセンス キーを確認する
ライセンス キーが正しく適用されているかどうかを確認するには、IsLicensed プロパティをチェックすることができます。 次のコードスニペットを使用してください。
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ライセンス キーを検証する
ライセンスやトライアル キーの有効性を確認するには、次のコード スニペットを使用できます。
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戻り値がTrueの場合、キーが有効であることを意味し、IronPrint の使用を続行できます。 ただし、戻り値がFalseの場合、それはキーが無効であることを示しています。
ステップ 4: プロジェクトの開始
IronPrint を使い始めるには、 IronPrint の使い方に関する包括的なチュートリアルに従うことを強くお勧めします。 このチュートリアルでは、IronPrint の基本を理解するのに役立つ詳細な手順と例を示します。
質問やサポートが必要ですか?
ライブ プロジェクトで IronPrint を使用するには、ライセンスを購入することで取得できる有料または試用版のライセンス キーが必要です。 トライアル ライセンスはこのリンクを訪問することで利用できます。
コード例、チュートリアル、ライセンスの詳細、広範なドキュメントの包括的なコレクションについては、当社の Web サイトのIronPrintセクションをご覧ください。
ご質問があれば、support@ironsoftware.comまでお気軽にお問い合わせください。
よくある質問
C#印刷アプリケーションのライセンスキーを取得するにはどうすればよいですか?
IronPrintのライセンスページからライセンスキーを購入するか、無料の30日間トライアルキーに登録してプロジェクトを制限なしでライブ展開できます。
C#でライセンスキーを適用する手順は何ですか?
C#でライセンスキーを適用するには、アプリケーションのスタートアップでコードIronPrint.LicenseKey = "YOUR_LICENSE_KEY";を使用します。"YOUR_LICENSE_KEY"を実際のライセンスキーに置き換えます。
Web.ConfigまたはApp.Configでライセンスキーを設定するにはどうすればよいですか?
構成ファイルのappSettingsセクションにライセンスキーを次のように追加します:<add key="IronPrint.LicenseKey" value="YOUR_LICENSE_KEY"/>。
Web.configにライセンスキーが適用されない場合はどうすればよいですか?
2024.3.6以降にリリースされたバージョンを使用していることを確認してください。問題が続く場合は、IronPrintウェブサイトの「Web.configでのライセンスキー設定」トラブルシューティング記事を参照してください。
.NET Coreアプリケーションでライセンスキーを適用するにはどうすればよいですか?
.NET Coreアプリケーションでは、キーと値のペアを含むappsettings.jsonファイルを追加し、そのプロパティを「出力ディレクトリにコピー: 常にコピー」に設定します:{ "IronPrint.LicenseKey": "YOUR_LICENSE_KEY" }。
IronPrintライセンスキーが正しく適用されたかどうかを確認するにはどうすればよいですか?
ライセンスキーが正しく適用されているかを確認するには、コードスニペットbool isLicensed = IronPrint.License.IsLicensed;を使用します。trueの値が返された場合、正常に適用されたことを示します。
IronPrintライセンスキーの有効性を確認するにはどうすればよいですか?
ライセンスキーを検証するにはbool isValid = IronPrint.License.IsValid;を使用します。trueが返された場合、キーは有効です。
IronPrintの開始に必要なリソースはどこで見つけられますか?
IronPrintプロジェクトを始めるための包括的なチュートリアル、コード例、広範なドキュメントはIronPrintウェブサイトをご覧ください。
IronPrintに関してサポートが必要な場合はどうすればよいですか?
サポートが必要な場合は、
IronPrint は .NET 10 と互換性がありますか? また、その環境ではライセンスはどのように機能しますか?
はい。IronPrintは.NET 10に加え、.NET 9、8、7、6、.NET Core 3.1以降、そして.NET Framework 4.6.2以降をサポートしています。ライセンスは.NET 10でも同じように機能します。ライセンスキーはコード( IronPrint.LicenseKey = "YOUR_LICENSE_KEY"; )で設定するか、構成(appsettings.json)を使用してグローバルに適用します。IsLicensedプロパティを使用して、適用が成功したかどうかを確認できます。.NET 10の機能とIsLicensed性については、「機能」セクションをご覧ください。([Iron Software.com](https://Iron Software.com/csharp/print/features/?utm_source=openai))






