安全性串流的錯誤案例會以不同的方式處理,而連續呼叫 BeginAuthenticateAsServer
或 BeginAuthenticateAsClient
不會再失敗。
導入的版本
5.0
變更描述
在舊版 .NET 中,未先呼叫 EndAuthenticateAsServer
或 EndAuthenticateAsClient
即連續呼叫 BeginAuthenticateAsServer
或 BeginAuthenticateAsClient
,將會導致 NotSupportedException。 從 .NET 5 開始,連續呼叫 BeginAuthenticateAsServer
或 BeginAuthenticateAsClient
不會再導致 NotSupportedException,因為這些 API 受到 Task 型實作的支援。
變更原因
將內部實作從非同步程式設計模型 (APM) 切換至 Task 型,可提升效能並降低程式碼複雜度。
建議的動作
開發人員無須採取任何動作。