are calls to an api cors?
i would appreciate it if you explain theoretically why i need cors in the first place why can t i call the web service without any options and what not rtp jun 6 15 at 20 43 cors has nothing specifically to do with angularjs and the webapi and who s brilliant idea was to make two calls just to get the info with cors now all my requests will be doubled how can i fix the cors problem between angularjs and webapi it would be really nice if somebody can explain to me theoretically why can t i call my web service without this cors thingyy cross domain calls in asp net web apis note if you are completely new to asp net web api then i recommend that you check out some of the tutorials as of its beta release there is no native support for cross domain calls in asp net web apis it s fairly simple though to implement those the comments sample has a simple jsonp formatter this post shows one way to implement cors in a web api project using a message handler to use the new cors features in web api it s helpful to understand the details of cors itself because the web api implementation is true to the specification angularjs and webapi cors is cors problem on webapi stupid or is it me aren t web services suppose to be consumed by third parties can somebody please explain to me why am having problem calling the webapi if it was on a different domain its a web services its suppose to be on a different domain preflight cors requests if an ajax call isn t a simple request then it requires a preflight cors request which is simply an additional http request to the server to obtain permission this preflight request is made automatically by the browser and uses the options http method the general mechanics of cors are such that when javascript is attempting to make a cross origin ajax call the browser will ask the server if this is allowed by sending headers in the http request for example origin the cors support in web api is a full framework for allowing an application to define the permissions for cors requests the framework revolves around the concept of a policy that lets you specify the cors features to be allowed for any given request into the application let s start with a new asp net mvc 4 web api project add a solution folder since we ll add a new project to do the cross domain calls in order to get something useful out of the controller from the template i changed it a little to be able to test it by storing the values in an in memory list CORS relaxes this restriction by letting servers indicate which origins are allowed to call them. CORS is enforced by browsers but must be implemented on the server, and the most recent release of ASP.NET Web API 2 has full CORS support.
Yes