I am calling my asp.net mvc actionmethod as a JsonResult as a return type and return the list of data having 50000 racords atleast and want to set the size of ajax return as well and it is done as well.
But when I return values it throw me an error :
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.
My code:
return new JsonResult()
{
Data = mydatalist,
MaxJsonLength = Int32.MaxValue
};
Here I want to set JsonRequestBehavior.AllowGet but where and how don't know?
Can any one have done this before thanks in advance.
Just see the options available inside the JsonResult you will find the JsonRequestBehavior and set that as an allowget.
return new JsonResult()
{
Data = mydatalist,
MaxJsonLength = Int32.MaxValue,
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};