2017-07-24 34 views
0

我有一個HTTPS Azure Odata Web Api。和HTTPS MVC UI應用 當我試圖訪問的Web API的方法是拋出一個錯誤的ERR_INSECURE_RESPONSE在方法類型GET中的ajax調用中GET

"ERR_INSECURE_RESPONSE" 
EG . 
**WEB API Method** 
GetDetails() 
{ 
return "okay "; 
} 

UI Ajax call 
var Url = "https://XXXXXXX.com/" + 'odata/XXXXX';; 

$.ajax({ 
       url: Url, 
       async: false, 
       dataType: "jsonp", 
       //contentType: "application/json; charset=utf-8", 

       type: "GET", 
       headers: { 
        'Authorization': 'Bearer ' + result.Token 
       }, 

       success: function (data) { 
        alert("success"); 


       }, 
       error: function (error) { 
        alert(error); 
       }, 
       failure: function (error) { 
        alert(error); 
       } 
      }); 

我有一個數據類型嘗試作爲JSON太 我已經嘗試添加內容類型了。

回答

0

我得到了一次,並重新啓動瀏覽器解決了它。我認爲它與你的SSL證書

+0

我已經重新啓動瀏覽器,但仍然有那些:( –