Home Mixed-Content over https because an insecure XMLHttpRequest request
Reply: 0

Mixed-Content over https because an insecure XMLHttpRequest request

user990
1#
user990 Published in April 25, 2018, 12:23 pm

I know that something is calling over http instead of https, but actually I don't know how to fix this issue!

$.ajax({
    type: "GET",
    url: window.location.href.substring(0, location.href.lastIndexOf("/") + 1) + '/MyService.asmx/MyMethod';,
    data: 'param=' + JSON.stringify({ "myParam": value.trim() });,
    dataType: "text",
    error: function (XMLHttpRequest, textStatus, errorThrown) {
        alert("Request: " + XMLHttpRequest.toString() + "\n\nStatus: " + textStatus + "\n\nError: " + errorThrown);
    }, ...

I even tried this way but no success:

Url: '//MyService.asmx/MyMethod';

Given error is: Mixed Content: The page at 'https://www.example.com/MyPage.aspx' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.example.com/MyService.asmx?param=paramValue'. This request has been blocked; the content must be served over HTTPS.

Any suggestion?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.365667 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO