My angularjs app is embedded into asp.net mvc app.
From angularjs I'm sending a request to a cross domain like
$http({
method: 'POST',
url: 'http://www.mywebservice.com',
data: { username: uname, password: pass },
headers: { 'Content-Type': 'application/json' }
}).success(function (data, status, headers, config) {
console.log('status', status);
console.log('data', status);
console.log('headers', status);
});
}
and I'm getting
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.mywebservice.com. (Reason: CORS request failed).
Is it something that I can fix on asp.net mvc server side inside which this angularjs app is running or is something I should check on mywebservice.com side?