0

I have a web site with a sub domain which are on https.Befor switching to https, I had a page and a js file inside web site which sends request to web api. everything works fine untile I switched to https. After that none of my requests accepted by web api in subdomain. In fiddler I get 502 error:

System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https

$.get("https://api.mydomain.com/api/CaptchaImage/GetCaptcha", {}).done(function(data) {
$("#captcha").attr("src", "data:image/jpeg;base64," + data[0].CaptchaImage);
$("#hdnCaptcha").val(data[0].CaptchaText);})
Afsaneh Daneshi
  • 340
  • 4
  • 17
  • Please post some code to help you (ajax request for example) – jean-max Dec 13 '16 at 12:50
  • i think this might help you to fix that bad gateway error: http://stackoverflow.com/questions/21056990/how-to-make-an-ajax-https-get-request-using-jquery – Masoud Andalibi Dec 13 '16 at 13:05
  • https / / api.mydomain.com/api/CaptchaImage/GetCaptcha or https : / / api.mydomain.com/api/CaptchaImage/GetCaptcha ? – Tom Dec 13 '16 at 14:40

1 Answers1

0

I solved the problem and I found that request from https to http is not possible and both must be https.

Afsaneh Daneshi
  • 340
  • 4
  • 17