Reputation: 1696
i have a project in which i have enabled CORS
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:63736");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "POST,GET,DELETE,PATCH,PUT,OPTIONS");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, Accept,WWW-Authenticate");
call to .../api/login passed ok using jquery how ever when i am trying to query odata with breeze i get cors error
XMLHttpRequest cannot load http://localhost:53809/odata/Metadata. Origin http://localhost:63736 is not allowed by Access-Control-Allow-Origin.
how come?
Upvotes: 0
Views: 1147
Reputation: 1658
Ward posts some good information on CORS in this post: Using Breeze with a WebApi Service from another domain
Take a look at that first and see if it solves your problem.
Upvotes: 1