このAJAXメソッドを呼び出すと、「error:undefined」メッセージが表示され続けます。
$.ajax({
type: "GET",
async: false,
url: "localhost/ServiceHost/Security.svc/GetAllUserErrors",
data: "{ }",
dataType: "json",
contentType: "application/json; charset=utf-8",
dataFilter: function (data) { return data; },
success: function (data) {
for (var i = 0; i < data.d.length; i++) {
if (i % 2 == 0) rows += "<tr><td><input type=\"checkbox\"/></td>";
else rows += "<tr class=\"alternate-row\"><td><input type=\"checkbox\"/></td>";
rows += "<td>" + data.d.SyncTimeStamp.toString() + "</td>";
rows += "<td>" + data.d.Name.toString() + "</td>";
rows += "<td>" + data.d.Login.toString() + "</td>";
rows += "<td>" + data.d.NotificationText.toString() + "</td>";
rows += "<td class=\"options-width\"><a href=\"\" title=\"Edit\" class=\"icon-2 info-tooltip\"></a></td></tr>";
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus + ":" + errorThrown);
}
});
WCFが実行されていることはわかっていますが、このエラーが発生する理由がわかりません。何か助けはありますか?
問題は「url」の部分のどこかにあると確信しています。この行の適切な構文は何ですか?
<services>
<service name="Security.WCFServiceLibrary.Security">
<endpoint address="" binding="wsDualHttpBinding" bindingConfiguration=""
contract="Security.WCFServiceLibrary.ISecurity" />
</service>
</services>