Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2646
  • Last Modified:

The remote certificate is invalid according to the validation procedure.

Hello,
I'm trying to send E-mail using System.Net.Mail in a Windows Forms application in C#.
I'm getting the following error..

"The remote certificate is invalid according to the validation procedure."

Please help me with this..
Thanks,.
0
godwindotnet
Asked:
godwindotnet
1 Solution
 
ParanormasticCryptographic EngineerCommented:
There are 3 primary reasons why a cert won't validate:

1) Name mismatch - make sure the site name matches exactly as it is in the cert.  If there is a "Subject Alternative Name" (SAN) on the details tab, then make sure the name is in that list (note: subject name must also be included in the SAN).  Some applications don't supports SANs, but most do.  Also note that site1 and site1.domain.com are not the same - this is the most common mistake.

2) Untrusted - you need to install the root certificate into the trusted root certificate store.  If this app uses the Microsoft root store, you can check Certificates MMC to see if it shows up.  If not, view the details of the certificate from the error box, go to the certification path tab and double click the topmost certificate, go to details tab and Copy to File button to export it, then from your saved copy you can import it to the trusted root store.

3) Expired or not yet valid - usually from the cert expiring - renew it.  Can also happen if the time/time zone/date/year is off in the client OS - if this is ok, try also checking the same in BIOS.

If this doesn't get you in the right direction, you need a little bit more specific details how it is not coming up as valid - if you have a debug version try doing that so you can get more details.  If you are writing an app that deals with certs, you should try to mimic each of the 3 sections above for correct error handling and better warning messages.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now