The request was aborted: Could not create SSL/TLS secure channel çözümü
12 Temmuz 2021 / 13:55
Burak
Merhabalar
Asp.net veya .net de bir xml den veri okurken veya post ederken ” The request was aborted: Could not create SSL/TLS secure channel. ” şeklinde bir hata alıyorsanız
Eğer tek bir sayfada yapmak istiyoranızgereken page_load eventına aşağıdaki kodu yazabilirsiniz.
1 |
ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; |
Veya
1 |
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; |
Eğer her sayfada etkin olmasını istiyorsanız ” Global.asax ” dosyasına aşağıdaki şekilde revize edebilirsiniz.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<%@ Application Language="C#" %> <%@ Import Namespace="System.Web.Configuration" %> <script runat="server"> void Application_Start(object sender, EventArgs e) { System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; } void Application_End(object sender, EventArgs e) { } void Application_Error(object sender, EventArgs e) { } void Session_Start(object sender, EventArgs e) { } void Session_End(object sender, EventArgs e) { } </script> |
Hepsi bu kadar sorun çözülmüştür.
Etiketler: The request was aborted: Could not create SSL/TLS secure channel hatası, The request was aborted: Could not create SSL/TLS secure channel solutions
Bu Yazılarıda Okuyabilirsiniz...
Bir cevap yazın