OPTIONS http://localhost:7514/Employees/testrestricted 401 (Unauthorized) angular.js:10419
OPTIONS http://localhost:7514/Employees/testrestricted Origin http://localhost:4064 is not allowed by Access-Control-Allow-Origin. angular.js:10419
XMLHttpRequest cannot load http://localhost:7514/Employees/testrestricted. Origin http://localhost:4064 is not allowed by Access-Control-Allow-Origin.
I have my app.js setup like this already:
var app = angular.module('angular-auth-demo', ['http-auth-interceptor']);
app.config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
$routeProvider.
when('/home', { templateUrl: 'partial-content.html', controller: 'ContentController' }).
otherwise({ redirectTo: '/home' });
}]);
is there a way to find out if this is an error on angular or asp.net mvc, because I have a cors configuration on that end too, but i don't think the browser is actually getting a chance to hit the server?