Inheritance: System.Exception
Ejemplo n.º 1
0
 internal static AuthenticationException CreateCustomException(string uri, AuthenticationException ex)
 {
     if (uri.StartsWith("https"))
     {
         return(new AuthenticationException(
                    "Invalid remote SSL certificate, override with: \nServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => isValidPolicy);", ex));
     }
     return(null);
 }
Ejemplo n.º 2
0
 internal static AuthenticationException CreateCustomException(string uri, AuthenticationException ex)
 {
     if (uri.StartsWith("https"))
     {
         return new AuthenticationException(
             String.Format("Invalid remote SSL certificate, overide with: \nServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => isValidPolicy);"),
             ex);
     }
     return null;
 }