This project is read-only.
1
Vote

ImageMap on a https site

description

Hey,

I tired to use ImageMap on a https site and could not make it work. Could handling of https site be added?

My workaround was following changes to ImageMapEditor.cs
  1. "https" in addition to "http" in ImageUrl get method.
  2. "ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(bypassAllCertificateStuff);" in the using statement for WebClient in OnLoad. Where bypassAllCertificateStuff returns true.
using (WebClient webClient = new WebClient())
{
ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(bypassAllCertificateStuff);
webClient.DownloadData(ImageUrl);
}

private static bool bypassAllCertificateStuff(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)
{
return true;
}

comments