Click here to Skip to main content
11,709,529 members (46,863 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
When I am using following code, which takes location name & returns latitude & longitude; Subgurim.Controles.GMap.geoCodeRequest(......) it is showing an error:

System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel


How do I fix it?
Posted 8-Jun-11 23:46pm
Edited 9-Jun-11 21:52pm
Dalek Dave433.2K
v4
Comments
Dalek Dave at 10-Jun-11 3:52am
   
Edited for Grammar, Syntax and Readability.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
 
//add following code before smtpClient.Send()

smtpClient.EnableSsl = true;
 
ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
  Permalink  
Comments
jayashree shinde at 28-Dec-12 4:23am
   
yes solution 4 is rt ...Thnx
Showne at 23-Feb-13 1:30am
   
I think, SMTP for Gmail configuration it is not needed but for using local mail server it is very very important. Thanx a lot..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Couldn't find enough information to get to the root of problem.

But check http://gathadams.com/category/google-maps/[^], and try to make a simple application to check if it works.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
Comments
Dalek Dave at 10-Jun-11 3:53am
   
Nice Spot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 590
1 OriginalGriff 250
2 Maciej Los 225
3 Peter Leow 219
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,027
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 11 Jul 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100