I'm basically trying to access my web api which is uploaded to Azure.
I added my CORS attribute to the WebApiConfig class:
public static void Register(HttpConfiguration config) { var cors = new EnableCorsAttribute("http://localhost:51407", "*", "*"); config.EnableCors(cors);
However, whenever I send an Ajax request (using angularJS), which rightfully contains
Origin: http:
I get an error message:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:51407' is therefore not allowed access.
What could be the problem?
source share