Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

592
Vistas
Supporting different version of TLS in .Net

I support a legacy on-premise .Net 4.0 WinForms application. The application uses System.Net.Mail.SmtpClient to send emails via our customers' own SMTP servers. Recently, we've had issues with Office 365 mandating TLS 1.2. Having read that as long as .Net 4.5 is installed, .Net 4.0 applications can utilise TLS 1.2, I added this line:

System.Net.ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;   // 3072 = TLS 1.2

This solved the issue of connecting to Office 365, but introduced issues making non-SMTP connections to other older 3rd party applications that do not support TLS 1.2. I therefore changed the approach to add TLS 1.2 to the list of allowable protocols rather than set it as the mandated protocol (as outlined in this question and this question), and also added TLS 1.3 at the same time:

System.Net.ServicePointManager.SecurityProtocol |=
    (SecurityProtocolType)3072 |    // 3072 = TLS 1.2
    (SecurityProtocolType)12288;    // 12288 = TLS 1.3

This resolved both issues for some clients and works in our test environment with our own Office 365 account. However, some of our clients have reported issues connecting to Office 365 again. Revert to mandating TLS 1.2 again resolves the SMTP issue, but reintroduced the other problem.

Is it possible to specify the security protocol for a specific connection rather than take this global approach?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda