Uri ruta = new Uri(rutaFichero + nombreFichero);
CredentialCache cache = new CredentialCache();
cache.Add(ruta, "NTLM", new NetworkCredential("usuario", "dominio", "pass"));
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications);
// to ignore SSL certificate errors
public bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
}
No hay comentarios:
Publicar un comentario