Solved

The remote certificate is invalid according to the validation procedure.

Posted on 2009-05-18
1
2,585 Views
Last Modified: 2013-11-30
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
Comment
Question by:godwindotnet
1 Comment
 
LVL 31

Accepted Solution

by:
Paranormastic earned 500 total points
ID: 24411860
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you need a certificate so you can offer SSL encryption.  But which one should you get?  There are so many choices out there! Here is a generic overview of the main types of SSL certificates sold by the majority of commercial Certification Auth…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now