“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.”
今天在调试Mvc通过Json传递数据的小例子时,发生了这个错误,网上查阅资料后了解到,出于安全角度考虑,MVC2不允许使用Get方法获取Json数据,仅允许使用Post,而我们非要使用Get怎么办呢?其实错误里已经说明白了,使用return json(json,JsonRequestBehavior.AllowGet) 即可~~
…问个问题…为啥要用JSON+GET?
@雨碎江南, Just For Testing~Test The Mvc So…
受教了!~~