Как включить кросс-исходный запрос в web api 2?
I know its not a big issue to resolve ,But i am facing problem to consume web api in asp.net MVC web api. I am getting below error: "XMLHttpRequest cannot load http://192.168.1.71:800/api/IzoGlass/ToolLocationData. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:58469' is therefore not allowed access". I've searched and find solution but not working fine with my application. Description :-When i am consuming web api from same domain in my application its working fine. but whenever i am consuming webapi from other domain its throwing error. given above.
Что я уже пробовал:
Я использовал этот код внутри файла webapi.config.
ВАР коров = новый нем("http://192.168.1.71", "*", "*");
конфиг.EnableCors (cors);