將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
請注意從IronPDF版本2024.1.20開始,使用者需要至少擁有免費的試用授權金鑰,才能在他們的專案中使用IronPDF程式庫。 專案中缺少授權金鑰將拋出上述LicensingException錯誤。)]}
有關更多選項,包括appsettings.json,請參閱以下如何操作頁面以獲取更多資訊:IronPDF授權金鑰
準備開始了嗎?
Nuget 下載 20,296,129 | 版本: 2026.7 剛剛發布

