title: MVC web api: No 'Access-Control-Allow-Origin' header is present on the requested resource
body: <p>I tried everything that is written in this article: <a href="http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api" rel="noreferrer">http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api</a>, but nothing works.
  I'm trying to get data from webAPI2 (MVC5) to use in another domain using angularJS.</p>
  
  <p>my controller looks like this:</p>
  
  <pre><code>namespace tapuzWebAPI.Controllers
  {
      [EnableCors(origins: "http://local.tapuz.co.il", headers: "*", methods: "*", SupportsCredentials = true)]
      [RoutePrefix("api/homepage")]
      public class HomePageController : ApiController
      {
          [HttpGet]
          [Route("GetMainItems")]
          //[ResponseType(typeof(Product))]
          public List&lt;usp_MobileSelectTopSecondaryItemsByCategoryResult&gt; GetMainItems()
          {
  
  
              HomePageDALcs dal = new HomePageDALcs();
              //Three product added to display the data
  
              //HomePagePromotedItems.Value.Add(new HomePagePromotedItem.Value.FirstOrDefault((p) =&gt; p.ID == id));
  
  
              List&lt;usp_MobileSelectTopSecondaryItemsByCategoryResult&gt; items = dal.MobileSelectTopSecondaryItemsByCategory(3, 5);
              return items;
  
          }      
      }
  }
  </code></pre>