I have a site in ASP.NET MVC on Amazon (it follows Link ), and it has the following JsonResult:
public JsonResult getPessoas(){
List<Pessoa> pessoas = new List<Pessoa>();
for(int i = 0; i++; i < 10)
{
Pessoa pessoa = new Pessoa()
pessoa.ID = i;
pessoa.Nome = "Nome " + i;
pessoas.add(pessoa);
}
return Json(pessoas, JsonRequestBehavior.AllowGet)
}
That returns me the JSON, just access the link that you will see.
However, when I try in another application via AJAX to access this JSON, the following error appears to me:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at link . (Reason: CORS request did not succeed.) [Learn More]
I have read in some forums that I need to release CORS on the server, but how is it in an Elastic Beanstalk from Amazon Web Services, how can I do this?