I have deployed a web service on azure which perform some specific action and received a well defined ** HTTP URL ** .It accepts Json paramenter. I am trying to consume that service(http) from my https page. As result getting this error as :

Mixed Content: The page at 'https://domain/pages/white-papers.aspx#' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://azurewebsites.net/api/WhitePaper/'. This request has been blocked; the content must be served over HTTPS.

I looked a lot and tried number of approaches but still getting the same result. How can i actually call the (http) service from my JS file(rest call) , which is embedded in the page(https).


The best strategy to avoid mixed content blocking is to serve all the content as HTTPS instead of HTTP.

For your own domain, serve all content as HTTPS and fix your links. Often, the HTTPS version of the content already exists and this just requires adding an "s" to links - http:// to https://.

For other domains, use the site's HTTPS version if available. If HTTPS is not available, you can try contacting the domain and asking them if they can make the content available via HTTPS.

Refer this article for more details: How to fix a website with blocked mixed content (this is just an example)

Hope this helps!

  • Although the web services is hosted on azure , which gives me URL as (http) . I concern about how can i consume that from my https page. – user27178 May 4 '15 at 12:28
  • Is it possible your azure service comes through https protocol? That it will be easy for you to consume it. – Pradip R. May 4 '15 at 12:31
  • Take a look at this documentation: azure.microsoft.com/en-in/documentation/articles/… . This might help you configure https protocol for your service. – Pradip R. May 4 '15 at 12:32
  • As per i looked into the issue , i found that this is an cross domain call which is restricting me to access the unsecured content from my secured page.For this my azure hosting service need to be bounded with certificate for https call (obviously for its security reason). Please correct me if I am incorrect. – user27178 May 4 '15 at 13:52
  • Here is link for Jquery Cross-Domain ajax call using JSONP: codeproject.com/Articles/667387/… may be this will be helpful to you. – Pradip R. May 4 '15 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.