Failed to execute 'send' on 'xmlhttprequest' failed to load

Hi guys, I get the error mentioned in the header when I try to run my application created in DevExtreme.

Whenever I run my application in the DevExtreme simulator, it works as it should, but when I try to run the application on my phone, I get the indicated error.

function CallService() { var baseAddress = "http://192.168.80.2:8080/WebService/rest/WarehouseServices/"; $.ajax({ type: "GET", url: baseAddress + 'getPickingOrders', contentType: 'applicaiton/xml; charset=utf-8', dataType: "xml", async: false, success: function (xmlObject) { xml = xmlObject; console.log("succes ramt"); alert(xml); console.log(xml); dataSource = GetData(xmlObject); }, error: ErrorOccur }); } 

I have been dealing with this problem for a long time, and I have no ideas.

+4
source share
1 answer

If the page on which this script is executed is not located at http://192.168.80.2:8080 , and your server does not include the Cross resource resource for whatever source it may be, you will encounter the same origin policy that prohibits ajax with cross origin.

+2
source

Source: https://habr.com/ru/post/1246450/


All Articles