Estoy tratando de imprimir los mensajes de registro de nuestra versión secundaria. Pero estoy luchando con eludir el certificado SSL no válido. Este es el error:Ignorando el certificado SSL no válido
OPTIONS of ' https://xxxxx/svn/SiteFabrics/trunk/AppLaunch/Bloc/Frontend ': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://xxxx)
Mi intento de ignorar el error de certificado fue la de añadir esta línea:
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
Sin embargo, eso no hace ninguna diferencia ya que el error .net sigue siendo el mismo. Debajo está el código, ¿alguien puede ver lo que estoy haciendo mal?
using (SvnClient client = new SvnClient())
{
Collection<SvnLogEventArgs> list;
client.Authentication.DefaultCredentials = new NetworkCredential("user", "pass");
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
SvnLogArgs la = new SvnLogArgs(); //{ Start=128; End=132; };
client.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true);
client.GetLog(new Uri("https://[svnurl]"), la, out list);
ViewBag.SVNLog = list;
}
¿Has visto esta publicación ?: http://stackoverflow.com/questions/3099392/svn-repository-authentication-using-sharpsvn – Tomas
En las versiones recientes de SharpSvn puedes usar .UseDefaultConfiguration() en lugar de .LoadConfiguration para evite usar un directorio de temperatura. –