ASP.NET MVC 2.0 JsonRequestBehavior Global Setting

前端 未结 6 879
轻奢々
轻奢々 2021-02-02 06:50

ASP.NET MVC 2.0 will now, by default, throw an exception when an action attempts to return JSON in response to a GET request. I know this can be overridden on a method by method

6条回答
  •  一向
    一向 (楼主)
    2021-02-02 07:32

    I also got this error when I first use MVC 2.0 using my old code in MVC 1.0. I use fiddler to identify the cause of the error. See the steps on how to troubleshoot it using Fidder -

    http://www.rodcerrada.com/post/2011/07/11/jQuery-getJSON()-does-not-tirgger-the-callback-in-ASPNET-MVC-2.aspx

提交回复
热议问题