The client and server cannot communicate, because they do not possess a common algorithm

smtpclient ile email gönderen, C# ile geliştirilmiş uygulama e-mail gönderemiyor ve şu aşağıdaki hatayı vermeye başlıyor.
The client and server cannot communicate, because they do not possess a common algorithm
The client and server cannot communicate, because they do not possess a common algorithm

The client and server cannot communicate, because they do not possess a common algorithm
The client and server cannot communicate, because they do not possess a common algorithm hatasının çözümü nedir?
The client and server cannot communicate, because they do not possess a common algorithm hatası SSL ile güvenli bağlantı yapılan uygulamalarda karşınıza çıkabilir. Hatanın temel sebebi kullanılan TLS sürümünün uyuşmaması olabilir.
Örneğin sunucunuz TLS 1.0 desteklemiyorsa, güvenlik sebebi ile TLS 1.0'ı kapattıysanız karşınıza bu hata çıkabilir.
Çünkü uygulamanız .NET Framework 4.5 altında çalışıyorsa, .NET Framework 4.5 varsayılan olarak TLS 1.0 kullanır. 

Hatanın Çözümü için kodlarınıza şu satırı ekleyebilirsiniz:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 
Eğer uyguamanız .NET Framework 4.0 altında çalışıyorsa
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; 
satırını ekleyin.
Ayrıca .NET Framework 4.6 varsayılan olarak TLS 1.2 kullanmaktadır. Uygulamanızı 4.6'ya yükselterek de sorunu çözebilirsiniz.

Hiç yorum yok


Yorum Yaparak Sitenizin Adresini Verebilir, Tanıtımına Yardımcı Olabilirsiniz.

Blogger tarafından desteklenmektedir.