ÇÖZÜLDÜ: ( .NET CORE Hata ) The remote certificate is invalid according to the validation procedure. The SSL connection could not be established, see inner exception.

 

.NET CORE Hata: 

The remote certificate is invalid according to the validation procedure. 

The SSL connection could not be established, see inner exception. 


Çözüm:  Abdullah YAZICI

Localde ssl sertifikası hatası almamızdan kaynaklı bir sorun. Localde ssl sertifikası bağlantımızı değiştirdik. Sunucuya atarken tekrar güncelleme yapacağız.


Hata veren kod:

UzmanlikAlanlariApiService.cs

launchsettings.json


Çözüm için yaptığımız değişiklik(resimli)

UzmanlikAlanlariApiService.cs

ssl sertifikası bağlantımızı değiştirdik.

launchsettings.json



çözüm için yaptığımız değişiklik(kodlar):


UzmanlikAlanlariApiService.cs

 public UzmanlikAlanlariApiService(HttpClient httpClient, IHttpContextAccessor httpContextAccessor)

        {

            _httpcontextAccessor = httpContextAccessor;

            _httpClient = httpClient;

            //_httpClient.BaseAddress = new Uri("https://localhost:44317/api/UzmanlikAlanlari");

            _httpClient.BaseAddress = new Uri("http://localhost:63964/api/UzmanlikAlanlari");

        }    

launchsettings.json

{

  "iisSettings": {

    "windowsAuthentication": false, 

    "anonymousAuthentication": true, 

    "iisExpress": {

      "applicationUrl": "http://localhost:63964",

      "sslPort": 0 // 44317

    }

  },

Yorumlar

Bu blogdaki popüler yayınlar

ÇÖZÜLDÜ: mapper, System.BadImageFormatException: 'Could not load file or assembly 'DataAccess....Geçersiz biçimdeki bir program yüklenmek istendi

Asp.NET Core 5.0 - Kullanıcıdan Gelen Verilerin Doğrulanması Validations (Gençay Yıldız anlatımından resmedilmiştir)

Asp.NET Core 5.0 - Temel Kavramlar(User-Client-Hosting-IP-Domain-Request-Response-Layout-RenderBody-RenderSection ) (Gençay Yıldız anlatımı)