ExtJs poxy 数据异步传输问题
求大哥们帮忙,,该问题困扰几天了,一直未得解决。当我的URL调用的是webservice的时候,以下是错误信息:
{"Message":"尝试使用 GET 请求调用方法“GePartList”,但不允许这样做。","StackTrace":" 在 System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n 在 System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
如果我将URL改成wcf也不行。
qa.data.GEN_QA_PART = new Ext.data.JsonStore({
model : "GEN_QA_PART",
loadingText: false,
autoDestory: true,
autoLoad: false,
proxy: {
type: 'ajax',
headers: { "Accept": 'application/json', "Content-Type": 'application/json' },
url: 'GQSService.asmx/GePartList',
reader: {
type: 'json',
root: 'd',
idProperty: 'PART_ID'
}
},
listeners: {
scope : this,
load: function(){
}
}
});
Ext.Ajax.request({
method: 'POST',
headers : {"Accept" : 'application/json', "Content-Type" : 'application/json'},
url: 'GQSService.asmx/GetDefect_GroupList',
});
headers : {"Accept" : 'application/json', "Content-Type" : 'charset=utf-8'},