Ver Mensaje Individual
  #342  
Antiguo 17-03-2017
angelhorse angelhorse is offline
Registrado
NULL
 
Registrado: feb 2017
Posts: 5
Reputación: 0
angelhorse Va por buen camino
Buenas a todos.
Últimamente me sale este error:
"Ha surgido un problema: System.Net.WebException: Anulada la solicitud: No se puede crear un canal seguro SSL/TLS."

He intentando con un par de soluciones que ponen por internet como por estas 2 líneas:

private static Boolean ValidarCertificado(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
}

System.Net.ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(ValidarCertificado);
CredentialCache cache = new CredentialCache();


¿Os ha pasado a alguno?
Yo me estoy volviendo loco.

p.d. El certificado está en regla, de hecho es el que utilizo para acceder a Hacienda con credenciales.
Responder Con Cita