Monday, 23 December 2013

This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. - MVC


MVC by default does not allow the methods to be fetched directly which does return a JSON result due to security reasons. Request behavior shall be marked explicitly to allow to do a get operation.

return Json(data, JsonRequestBehavior.AllowGet)

Once you add this "JsonRequestBehavior.AllowGetOn" it allows to do a get operation to return the JSON result to browser.
 

No comments:

Post a Comment