Ben Foster 5/11/2015

Enabling CORS in ASP.NET Web API 2

Read Original

This technical article explains how to enable Cross-Origin Resource Sharing (CORS) in ASP.NET Web API 2. It compares two methods: the Web API-specific CORS package for fine-grained, attribute-based control and the OWIN middleware for broader application-level support, especially useful with OAuth. The post includes code snippets for configuring the OWIN middleware with a custom policy and a crucial tip for handling OPTIONS pre-flight requests in IIS via web.config.

Enabling CORS in ASP.NET Web API 2

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week