Cross-domain-ajax-Anfrage Ausgabe

Ich brauche, um die json-Daten aus der cross-domain.

$.getJSON('http://xx.xx.xx.xx/SampleService/Handler.ashx?callback=?', data, function (jsonData) {
                alert('1');
            })
            .done(function () { console.log("second success"); })
            .fail(function () { console.log("error"); })
            .always(function () { console.log("complete"); });

Handler-code:

context.Response.ContentType = "application/json";
                SampleService service = new SampleService();

                List<List<Byte>> response = service.GetData();
                string jsonData = JsonConvert.SerializeObject(response);
                context.Response.Write(string.Format("{0}([{1}]);", context.Request["callback"], jsonData));

Den Fehler, ich bin immer ist:

"parsererror"
Error: jQuery19108131180874027861_1366004862133 was not called
InformationsquelleAutor benjamin54 | 2013-04-15
Schreibe einen Kommentar