Asp.net web api 让jsonp在asp.net api中工作

Asp.net web api 让jsonp在asp.net api中工作,asp.net-web-api,jsonp,odata,backbone.paginator,Asp.net Web Api,Jsonp,Odata,Backbone.paginator,在让我的jsonp与我的客户端主干脚本一起工作时遇到问题,pagenator保持gettgin无效密钥错误 环顾四周,人们说这与我的服务有关,而不是返回jsonp 例如SyntaxError:invalid label,我已经编写了一个mvc4 web api服务,这是它返回的结果。它看起来正确吗?还有,我需要向我的api添加什么来支持jsonp吗 { "odata.metadata":"http://test.test.uk/api/odata/$metadata#lnews

在让我的jsonp与我的客户端主干脚本一起工作时遇到问题,pagenator保持gettgin无效密钥错误 环顾四周,人们说这与我的服务有关,而不是返回jsonp

例如SyntaxError:invalid label,我已经编写了一个mvc4 web api服务,这是它返回的结果。它看起来正确吗?还有,我需要向我的api添加什么来支持jsonp吗

   {
      "odata.metadata":"http://test.test.uk/api/odata/$metadata#lnews","value":[
        {
          "ID":1,"title":"This is a test news artical","mainContent":"<p>\r\n\tthis is a test article</p>\r\n","featured":1,"visiblehomepage":1,"thedatetime":"2013-08-05T10:36:05.98","expireon":"2013-08-15T00:00:00","category":17,"embargo":null,"embargotime":"PT0S","embargodate":null,"customthumbnail":null,"news_layout":3,"LNBE":0,"LNBN":0,"LNBS":0,"LNBW":0,"LNWV":0,"LNWS":1,"LNDY":0,"LNSW":0,"LNSH":0,"LNCV":0
        },{
          "ID":2,"title":"This is a test article","mainContent":"<p>\r\n\twelcome to the best site in the world</p>\r\n","featured":1,"homepage":1,"thedatetime":"2013-08-05T10:42:54.763","expireon":"2013-08-22T00:00:00","category":null,"embargo":null,"embargotime":"PT0S","embargodate":null,"customthumbnail":"Water lilies.jpg","news_layout":4,"LNBE":1,"LNBN":1,"LNBS":1,"ff":1,"LNWV":1,"LNWS":1,"LNDY":1,"LNSW":1,"LNSH":1,"LNCV":1
        }
      ]
    }
以下是一个JSONP URL:

http://odata.netflix.com/v2/Catalog/Genres?$format=json&$callback=?
这是一张图表:

CLIENT SERVER ------ ------ Makes URL request Looks up function matching this URL param ($callback) Executes asynchonously If found, executes function asynchonously Returns from callback Returns data from server side as a function, or error 客户端服务器 ------ ------ 使URL请求查找与此URL参数匹配的函数($callback) 异步执行如果找到,则异步执行函数 从回调返回作为函数或错误从服务器端返回数据 参考资料