Tuesday, April 27, 2010

MVC 2 blocks JSON GET requests by default

"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."

Welcome to MVC 2!
For security reasons, MVC 2 blocks JSON GET requests by default.  So if you really want to call that JsonResult method via a GET, you must explicitly allow it like this:
 

No comments:

Post a Comment