XMLHttpRequest cannot load http://*****/api/***.'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://*****therefore not allowed access. Solution: enable cors on you web api application . Steps: Goto top right corner of your visual studio and type package manager console. select package manager console and it opens up console at the bottom of vs as error List/output show up generally step 2: type the following command : Install-Package Microsoft.AspNet.WebApi.Cors it may ask for say yest to all as this package going to add some code and make some changes to application if you are using tfs if may request you to accept the changes and say yes to all . once installation is done you will see warnings in you error list and just by double clicking these error it included the missing references and evrything should be good . step 3: build and see if everything works fine. ...
Posts
Showing posts from February, 2015