0
.Net 서버에서 json 문자열을 읽는 상점이 있습니다. 문제는 sencha 앱이 결과가 없다는 것입니다 ("emptyText"). 이 가게는 더미 데이터와 함께 좋은 일했다 (자료 : [])하지만 난 문제에 봉착 프록시를 읽으려고 할 때Sencha touch 2 .net 서버에서 json을 읽을 수 없습니다.
상점 코드 :
Ext.define('myApp.store.myStore', {
extend: 'Ext.data.Store',
alias: 'widget.myStore',
autoLoad: true,
config: {
model: 'myApp.model.myModel',
proxy: {
type: 'scripttag', //Also tried ajax and jsonp
url: 'http://localhost:XXXX/ServerResponse/ReponseT.aspx?CityID=1',
reader: {
type: 'json'
}
}
}
서버 코드 (C#을) :
리소스 스크립트로 해석하지만, MIME 타입 text/html과 함께 전송 : "URL
List<result> Li = new List<result>(); result LR = new result() { id = 1, Title = "Heu There" }; Li.Add(LR); string ans = JsonConvert.SerializeObject(Li, Formatting.Indented); Response.Write(ans);
나는 경고가 "
은 그게 전부 ... 난 당신이 헤더 유형을 지정해야 몇 가지 중 하나가 내가
사용중인 서버 유형은 무엇입니까? – hekomobile