使用IronBarcode授權金鑰
如何取得許可證密鑰
新增 IronBarcode 許可證金鑰後,您可以將專案部署到線上,不受任何限製或浮水印。
您可以購買授權金鑰或在此處註冊免費的30天試用金鑰。
步驟 1:下載最新版本的 IronBarcode
透過 NuGet 安裝
在開始之前,我們需要安裝最新版本的條碼 NuGet 套件。
您可以在這裡找到更多有關NuGet套件的資訊。
透過 DLL 安裝
作為替代方案,您也可以下載IronBarcode.dll並將其添加到您的專案中。
步驟 2:套用您的許可證金鑰
使用代碼設定您的許可證
將此程式碼新增至應用程式啟動時的某個位置,在 IronBarcode 被使用之前。
// Apply your IronBarcode license key
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";Imports IronBarCode
' Apply your IronBarcode license key
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01"Imports IronBarCode
' Apply your IronBarcode license key
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"
}
步驟 3:測試您的鑰匙
測試您的金鑰是否已正確安裝。
// Verify if the provided license key is valid
bool result = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01");
// Check if IronBarCode is licensed successfully
bool is_licensed = IronBarCode.License.IsLicensed;// Verify if the provided license key is valid
bool result = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01");
// Check if IronBarCode is licensed successfully
bool is_licensed = IronBarCode.License.IsLicensed;' Verify if the provided license key is valid
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' Verify if the provided license key is valid
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
常見問題
我如何取得IronBarcode的授權金鑰?
您可以直接從IronBarcode網站購買授權金鑰,或註冊免費30天試用以獲得臨時金鑰。
我如何在專案中安裝IronBarcode?
IronBarcode可以透過NuGet套件管理器安裝,或下載IronBarcode.dll檔案並手動添加到您的專案中。
我如何使用程式碼在IronBarcode中啟用授權金鑰?
若要在IronBarcode中應用授權金鑰,請在應用程式啟動時添加以下程式碼:IronBarCode.License.LicenseKey = "YOUR-LICENSE-KEY";
我可以使用Web.Config或App.Config文件設置IronBarcode的授權金鑰嗎?
是的,您可以在Web.Config或App.Config的appSettings部分添加鍵值對來設置授權金鑰。
某些IronBarcode版本是否已知在Web.config中設置授權金鑰時存在問題?
是的,對於ASP.NET專案和.NET Framework版本>= 4.6.2的情況,Web.config中的鍵沒有被識別,影響了2023.4.1至2024.3.2版本的IronBarcode。
.NET Core應用程式中如何配置IronBarcode的授權金鑰?
在您的專案根目錄中創建一個appsettings.json檔案,添加IronBarCode.LicenseKey金鑰,並將其值設置為您的授權金鑰。確保此檔案始終複製到輸出目錄。
我如何驗證我的IronBarcode授權金鑰是否有效?
使用方法IronBarCode.License.IsValidLicense("YOUR-LICENSE-KEY")來驗證所提供的金鑰在您的應用程式中是否有效。
如果IronBarcode未顯示為已授權,我應採取哪些步驟?
確保授權金鑰已正確設置在您的應用程式中,並檢查Iron Software網站上記錄的任何已知問題。
我在哪裏可以獲得更多有關IronBarcode授權金鑰的幫助?
如需額外協助,您可以聯繫Iron Software支援,電郵至support@ironsoftware.com,或訪問他們的疑難排解文章以獲取更多信息。
Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。