Reputation: 2730
I'm trying to make a dynamic chart using HighCharts, but as it seems to be, is impossible to include ASP tags inside a JavaScript, so I'm trying to use JSon. I followed this tutorual step-by-step, but when I try to load the page, I get the following message:
This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.
So now I'm wondering if I have to set something in Web.Config
or somewhere else.
Could you guys help me?
Upvotes: 3
Views: 1689
Reputation: 27673
There is a pretty simple fix. In your request-handling functions, where you would have:
return Json(myStuff);
Replace it with the overload that takes a JsonRequestBehavior
:
return Json(myStuff, JsonRequestBehavior.AllowGet);
Upvotes: 6