ASP.NET Web Forms授權驗證問題

This article was translated from English: Does it need improvement?
Translated
View the article in English

IronPDF授權驗證在ASP.NET Web Forms應用程式中失敗。 由於不支持的TLS版本,對授權伺服器的HTTP請求被拒絕。

ASP.NET Web Forms應用程式預設為TLS 1.0,當targetFramework屬性時。 IronPDF授權伺服器需要TLS 1.2,.NET Framework 4.6.1及更高版本支持,但僅當httpRuntime targetFramework設置為該版本或更高時。 <compilation targetFramework>元素單獨並不充分。 httpRuntime targetFramework用於控制外出HTTP請求期間的TLS協議選擇。

解決方案

httpRuntime元素。

如果<system.web>內加入它:

<system.web>
  <httpRuntime targetFramework="4.7.2" />
</system.web>
<system.web>
  <httpRuntime targetFramework="4.7.2" />
</system.web>
XML

如果targetFramework,請新增該屬性:

<httpRuntime maxRequestLength="4096" executionTimeout="110" targetFramework="4.7.2" />
<httpRuntime maxRequestLength="4096" executionTimeout="110" targetFramework="4.7.2" />
XML

使用targetFramework="4.7.2"或更高的值。 啟用TLS 1.2的最小值是"4.6.1"

Curtis Chau
技術作家

Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。

除了開發,Curtis對物聯網(IoT)有濃厚的興趣,探索創新的方法來整合硬體和軟體。在空閒時間,他喜歡玩遊戲和建立Discord機器人,結合他對技術的熱愛與創造力。

準備開始了嗎?
Nuget 下載 20,088,359 | 版本: 2026.7 剛剛發布
Still Scrolling Icon

還在捲動嗎?

想快速獲得證明嗎? PM > Install-Package IronPdf
執行範例 看您的HTML變成PDF。