Skip to content

An error occurred while attempting to establish an SSL or TLS connection #1227

@dheoxic

Description

@dheoxic

I am getting this error when I deploy the application on IIS on another computer.


The server's SSL certificate could not be validated for the following reasons:
• The server certificate has the following errors:
  • The revocation function was unable to check revocation for the certificate.
  • The revocation function was unable to check revocation because the revocation server was offline.
• An intermediate certificate has the following errors:
  • The revocation function was unable to check revocation for the certificate.
  • The revocation function was unable to check revocation because the revocation server was offline.

I already tried the following but the error gets thrown from time to time (email sending starts working after an hour or two)

  1. client.CheckCertificateRevocation = false;
  2. client.Connect("smtp-mail.outlook.com", 587, SecureSocketOptions.None/Auto/SslOnConnect/StartTLS);

Is there any way I can prevent this from happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionA question about how to do something

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions