1

I need to call a WebService from a distant server with ajax in order to send some informations stored in the sessionStorage of the navigator, this is my code:

$.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: "http://10.7.138.42:6061/CatchEvent.asmx/CollectData",
    data: JSON.stringify({ "pDataDictionnary": lDataCollected }),
    dataType: "json",
    async: true,
    success: function (data, textStatus) {
        if (textStatus == "success") {
            alert('success');
        }
    },
    error: function (exception) {
        alert('Exeption : ' + exception);
    }
});

The pool that I'm using is under https and when I change the calling request to https it doesn't work. I need somtehing to ignore the calling method because I can't change it for the reason that the application is on a distant server that I cannot configure.

eisbehr
  • 12,243
  • 7
  • 38
  • 63
anass 90
  • 125
  • 1
  • 2
  • 14
  • your distant server is configured with https and your local app is in http. Is that what your concern or in reverse? – Keppy Sep 27 '16 at 10:35
  • @Keppy the reverse my local app is under https and the distant under http how to ignor this? – anass 90 Sep 27 '16 at 10:37
  • 1
    You can not just “ignore” this. If this needs to run in just your own local browser, then you can perhaps get it to suppress it using some startup flags/options - but you can not work around security measures like that for pages intended to be used by the public. Either get the remote site to support HTTPS, or downgrade your side of it to HTTP. – CBroe Sep 27 '16 at 11:07
  • 1
    @anass90 [read this](http://stackoverflow.com/questions/18251128/why-am-i-suddenly-getting-a-blocked-loading-mixed-active-content-issue-in-fire/18251129#18251129) and try the solution they have mentioned in comments. :-) – Keppy Sep 27 '16 at 13:25

0 Answers0