將 IronPDF 授權金鑰套用至專案
This article was translated from English: Does it need improvement?
Translated
View the article in English
授權金鑰是一串長字串,末尾標示著授權支援的到期日期。 請確認此內容已正確複製。
IRONPDF-MYLICENSE-KEY-1EF01-EXPIRES.01.JAN.2050
若授權金鑰字串中含有任何額外的空格或字元,將會導致以下錯誤:
Unhandled exception. IronSoftware.Exceptions.LicensingException: IronPDF must be licensed for development.
應用授權金鑰最穩妥的方法,是在呼叫函式庫之前,直接在程式碼中進行設定。
// Set the license key for IronPDF before making any calls to the library.
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-EXPIRES.01.JAN.2050";
// Set the license key for IronPDF before making any calls to the library.
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-EXPIRES.01.JAN.2050";
' Set the license key for IronPDF before making any calls to the library.
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-EXPIRES.01.JAN.2050"
$vbLabelText
$csharpLabel
{i:(自 IronPDF 2024.1.20 版本起,使用者必須至少擁有一個免費試用授權,方能於專案中使用 IronPDF 函式庫。 若專案中缺少授權金鑰,將會觸發前述的 LicensingException 錯誤。)}])}]
如需更多選項(包括 web.config 和 appsettings.json),請參閱以下操作指南頁面以獲取更多資訊:IronPDF 授權金鑰
準備開始了嗎?
Nuget 下載 19,014,616 | 版本: 2026.5 just released

