The request was aborted: Could not create SSL/TLS secure channel on Windows Server 2022 Datacenter

Rawl DC 20 Reputation points
2025-02-11T18:43:14.19+00:00

Todo comenzo porque mi aplicación asp.net Framework 4.8 dejo de conectarse a un WSDL y posteriormente me dí cuenta que el problema era a nivel servidor al momento de ejecutar Invoke-WebRequest en PowerShell.

Mi servidor funcionaba correctamente pero días atras he tenido problemas con Windows Server 2022, ya que al hacer una petición a un un WSDL me arroja: The request was aborted: Could not create SSL/TLS secure channel.

Ya realice varios cambios en mi servidor:

1.- Agregue a los archivos de registro la configuración para habilitar el TLS 1.2

2.- Ya comprobe con IIS Crypto mi servidor y analice el endpoint con https://www.ssllabs.com/

3.- Ya agregue los encabezados [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 en PoweShell

4.- En mi código fuente ya agregue C# ya agregue ServicePointManager.ServerCertificateValidationCallback = delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };

Me di cuenta que la aplicación .net en conjunto con el powershell se ejecuta correctamente en Windows 10, Windows 11, Windows Server 2012 R2 y Windows Server 2019.

Excepto Windows Server 2022, ya hice la prueba en 2 servidores y en ninguno se puede.

Anexo la URL del WSDL con el que tengo el problema

https://met.sep.gob.mx/met-ws/services/TitulosElectronicos.wsdl

Captura de pantalla 2025-02-11 111650

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rawl DC 20 Reputation points
    2025-02-11T21:45:49.3733333+00:00
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.