IronWebScraper 故障排除 在 Web.config 中设置许可密钥 IronWebScraper License Key for ASP.NET Curtis Chau 更新日期:6月 10, 2025 Download IronWebScraper NuGet 下載 DLL 下載 Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article This article was translated from English: Does it need improvement? Translated View the article in English 該問題已於 IronWebScraper 版本 2024.3.6 解決。 Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronWebScraper must be licensed for development. For older IronWebScraper versions, specifically those between versions 2023.4.13 and 2024.3.6, there is a known licensing issue in: ASP.NET 專案 .NET Framework 版本 >= 4.6.2 Web.config 檔中存儲的密鑰將不會被產品檢測並使用。 解決方案 為解決此問題,建議在代碼中使用 ConfigurationManager 從 Web.config 文件中檢索許可證密鑰,然後將其應用於 License.LicenseKey 屬性。 範例: <configuration> ... <appSettings> <add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/> </appSettings> ... </configuration> <configuration> ... <appSettings> <add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/> </appSettings> ... </configuration> XML 使用上面提供的 XML 文件,我們可以使用 ConfigurationManager 來檢索許可證密鑰值並將其傳遞給 IronWebScraper.License.LicenseKey 屬性。 // Retrieve the license key from the appSettings section of the Web.config file. string licenseKey = ConfigurationManager.AppSettings["IronWebScraper.LicenseKey"]; // Assign the license key to the IronWebScraper's LicenseKey property. IronWebScraper.License.LicenseKey = licenseKey; // Retrieve the license key from the appSettings section of the Web.config file. string licenseKey = ConfigurationManager.AppSettings["IronWebScraper.LicenseKey"]; // Assign the license key to the IronWebScraper's LicenseKey property. IronWebScraper.License.LicenseKey = licenseKey; ' Retrieve the license key from the appSettings section of the Web.config file. Dim licenseKey As String = ConfigurationManager.AppSettings("IronWebScraper.LicenseKey") ' Assign the license key to the IronWebScraper's LicenseKey property. IronWebScraper.License.LicenseKey = licenseKey $vbLabelText $csharpLabel Curtis Chau 立即與工程團隊聊天 技術作家 Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。 準備好開始了嗎? Nuget 下載 122,916 | 版本: 2025.11 剛剛發布 免費 NuGet 下載 總下載量:122,916 查看許可證