Using Cross Origin Resource Sharing (CORS) in ASP.NET Web API

Published 11 May 13 09:05 AM | bipinjoshi

For security reasons browsers prohibit AJAX calls to resources residing outside the current origin. This means you under the current settings, you can't provide a service exposed by a Web API to some other origin. However, at times you might want to allow a legitimate origin to access a resource. This is where Cross Origin Resource Sharing (CORS) specifications come into the picture. While there are other ways to enable CORS at the web application level, the ASP.NET Web API takes CORS support a step further through certain attributes. Using these attribute you can fine tune CORS at the global level, controller level or individual action level. This article discusses how this support can be used in your applications.

http://www.bipinjoshi.net/articles/540c368a-74ae-4693-a093-545e693988db.aspx

 

Comments

No Comments