consultancy chorley ASP.NET Server Side Scripting Wigan
Website Development Radcliffe

A Coder's Notes

Email :
bespoke invoice systems Standish Information Technology Advice Worsley
    development systems Ramsbottom
data manipulation Farnworth access databases Whitefield SQL connections Atherton
online accessible software Leyland software compatible Coppull

Get connected and Online Tottington
remote management Makerfield code and design Aspull

The remote certificate is invalid according to the validation procedure. - Fix In VB Visual Basic - 26/02/2011

You're trying to do a HTTPS post to a site that has an invalid certificate, or some other issue is getting in the way of the certificate validiation.  You do your code and you recive the message
The remote certificate is invalid according to the validation procedure.
Of course you've trawled the internet and seen countless C and C# so called solutions, but if like me you prefer're still scuppered.

Here's the code solution.

<% @ Import Namespace = "" %>
<% @ Import Namespace = "System.Security.Cryptography.X509Certificates" %>
<% @ Import Namespace = "System.Net.Security" %>

sub dohttppost(sender as object, e as eventargs)
  Net.ServicePointManager.ServerCertificateValidationCallback = AddressOf validateCert your https request here
......make sure this bit is working to the point where you receive the
......"The remote certificate is invalid according to the validation procedure."        
end sub

Function validateCert(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As SslPolicyErrors) As Boolean
 Return True
End Function

Please  DO NOT ask me to explain.  I took this from Here

What you are achieving is ignoring the certificate.  If you're confident in your code, the application is not really really secure and all that then fine, otherwise keep onlooking, this is simply a workaround

Post A Comment

Name Comment
Jose Lee Thank you, thank you, thank you.
programming services specialist
Valid XHTML 1.0 Transitional