I've build an WebAPI (.net) application and a simple HTML website for the front-end. Everything worked fine when executing via Visual Studio.
When I tried use this application in my host server, I did sucefully send (POST) a complex object via JSON to the webapi (login) and to "GET" complex objects (User info, configurations, etc...)
But, when I tried to perform a "GET" to obtain a list of object, the server respond: 500 - failed to execute 'send' on 'xmlhttprequest': failed to load '<link to my service>'
.
In Resume: GET and POST using objects goes fine GET a list of objects goes bad.
What do I do?
CODE:
function GetService(urlFunc) {
var ret = null;
$.ajax({
url: urlFunc,
type: 'GET',
dataType: 'json',
async: false,
crossDomain: true,
success: function (msg) {
ret = msg;
},
error: function (msg) {
//LOG EVENTS
ret = false;
}
});
return ret;
};