使用 IronBarcode 許可金鑰
如何獲得授權金鑰
添加 IronBarcode 授權金鑰可以讓您在不受限制或水印影響的情況下部署您的項目。
您可以在此購買授權 或註冊一個 免費 30 天試用金鑰在這裡.
步驟1:下載 IronBarcode 的最新版本
立即在您的專案中使用IronBarcode,並享受免費試用。
透過NuGet安裝
在開始之前,我們需要安裝最新版本的 Barcode NuGet 套件。
Install-Package BarCode
您可以找到更多關於該產品的資訊 NuGet 套件在這裡。
透過 DLL 安裝
作為替代方案,該 也可以下載 IronBarcode.dll 並添加到您的專案中。
步驟2:應用您的授權金鑰
使用代碼設定您的許可證
在使用IronBarcode之前,在應用程式啟動時的某個位置添加此代碼。
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01"
使用 Web.Config 或 App.Config 設定您的許可證
要在您的應用程序中使用 Web.Config 或 App.Config 全局應用密鑰,請在 appSettings 中將以下密鑰添加到您的配置文件中。
<configuration>
...
<appSettings>
<add key="IronBarCode.LicenseKey" value="IRONBARCODE-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
IronBarcode 版本之間存在已知的授權問題2023.4.1 - 2024.3.2與以下框架:
- ASP.NET 專案
.NET Framework 版本 >= 4.6.2
Web.config
文件中存儲的密鑰未被產品識別和使用。 訪問在 Web.config 中設定授權金鑰疑難排解文章以了解更多信息。
使用 .NET Core appsettings.json 文件設置您的許可證密鑰
要將密鑰全局應用於您的 .NET Core 應用程式:
- 在專案的根目錄中新增一個名為
appsettings.json
的 JSON 檔案到你的專案中。 - 在您的 JSON 配置檔案中添加一個
IronBarCode.LicenseKey
鍵。值應為您的授權金鑰。 確保檔案屬性包含複製到輸出目錄:總是複製
檔案:appsettings.json
{
"IronBarCode.LicenseKey":"IRONBARCODE-MYLICENSE-KEY-1EF01"
}
步驟三:測試您的金鑰
測試您的金鑰是否已正確安裝。
bool result = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01");
// Check if IronBarCode is licensed successfully
bool is_licensed = IronBarCode.License.IsLicensed;
bool result = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01");
// Check if IronBarCode is licensed successfully
bool is_licensed = IronBarCode.License.IsLicensed;
Dim result As Boolean = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01")
' Check if IronBarCode is licensed successfully
Dim is_licensed As Boolean = IronBarCode.License.IsLicensed
步驟 4:開始您的專案
遵循我們有關如何的教程開始使用IronBarcode.
有問題嗎?
如果您有任何疑問,請與我們聯繫support@ironsoftware.com