Пример #1
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);
 }
Пример #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;
 }