이 도움을받을 수있는 도움을 주시면 감사하겠습니다. 내 로컬 dev에, 나는이 성공적으로 테스트 할 수 있지만 다른 컴퓨터에 동일한 코드를 이동하고 작동하지 않는 것 및 디버깅은 원격뿐만 아니라 어렵습니다. 해야 할 모든 코드는 처리를 위해 서버로 데이터를 전송하는 것이지만, 어떤 이유로 든 전혀 작동하지 않습니다. 서버쪽에있는 모든 데이터는 전송 된 데이터를 가져 와서 다시 읽어내는 스켈레톤 메서드입니다.하지만 몇 가지 이유로 클라이언트 끝에서 매번 오류가 다시 발생하므로 아래 코드가 실행됩니다.JQuery asmx 디버깅 도움이 필요합니다.
"요청을 처리하는 동안 오류가 발생했습니다."
function getusersbyselectedrole() {
alert(role_filter);//check to be sure data is being collected
alert("{role :\"" + role_filter + "\"}"); //check to be sure the ride data is being sent to serve
alert("<%= ReportsLink %>/LoadUsersByRole");//check to be sure the right service address is being used
$.ajax({
type: "POST",
url: "<%= ReportsLink %>/LoadUsersByRole",
data: "{role :" + role_filter + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
$("#<%= sUsers.ClientID %>").append($("<option></option>").attr("value", "-1").text("select user"));
$.each(msg, function(key, value) {
$("#<%= sUsers.ClientID %>").append($("<option></option>").attr("value", key).text(value));
});
},
error: function(res, status) {
if (status === "error") {
// errorMessage can be an object with 3 string properties: ExceptionType, Message and StackTrace
var errorMessage = $.parseJSON(res.responseText);
alert(errorMessage.Message);
}
}
});
}
오류가 무엇인지 우리에게 있다면 좋을 텐데 =) – mrtsherman
우리가 볼 수있는 라이브 링크가 있습니까? ajax 요청이 다른 도메인에있는 서버로 전송됩니까? –
"요청을 처리하는 동안 오류가 발생했습니다." . 라이브 링크 없음. 위의 코드가 서버에 성공적으로 도달하지 않는 것 같습니다. – Kobojunkie