Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
27438 Points
4893 Posts
MVP
Oct 20, 2009 06:18 PM|LINK
in MVC v2 they block Json for GET requests (as you can tell from the error) for security reasons. If you want to override that behavior, check out the overload for Json that accepts a JsonRequestBehavior parameter.
public ActionResult Index()
{
return Json(data, JsonRequestBehavior.AllowGet)
}
BrockAllen
All-Star
27438 Points
4893 Posts
MVP
Re: JSON Problem - JsonRequestBehavior to AllowGet.
Oct 20, 2009 06:18 PM|LINK
in MVC v2 they block Json for GET requests (as you can tell from the error) for security reasons. If you want to override that behavior, check out the overload for Json that accepts a JsonRequestBehavior parameter.
public ActionResult Index()
{
return Json(data, JsonRequestBehavior.AllowGet)
}
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/