2014-06-16 2 views
0

비슷한 게시물을 읽었으며 그에 따라 수정되었습니다 .. 내 페이지에서이 오류를 수정할 수 없습니다 .. 디버그에서 .. FireBug에서 콘솔에 표시된 다른 오류가 없습니다. 이 오류 년 그냥 방법Ajax 호출 결과 500 내부 서버 오류

500 내부 서버 오류

.... 매개 변수 이름은 동일

이 내 아약스 방법 :

이은의 WebMethod

입니다
public partial class UFZillaErrorStatus : System.Web.UI.Page 
    { 

     [WebMethod] 
     public static UFZillaErrorStatusList GetErrorStatusList(int issueID) 
     { 
      return Dashboard.Model.UFZillaErrorStatus.UFZillaErrorStatusService.Get(issueID); 
     } 
} 

+0

은 WebMethod의 전체 코드입니까? 수업이 끝나지 않은 것처럼 보입니다. –

+0

"application/json"값의 헤더 "Accept"와 "Content-Type"을 ajax에 추가해보십시오. –

+0

당신은 "contentType :"application/json; charset = utf-8 ","?? 새로운 가치를 알려주시겠습니까 ?? –

답변

0

당신이 아래와 같이 해보시기 바랍니다 수 ..Any 제안이 도움이 될 것입니다이 문제를 추적 할 수있는 그 밖의 무엇 :

function getErrorStatusList() { 
var serve=JSON.stringify({issueID:$("#proselct option:selected").val()}); 
    $.ajax({ 
     type: "POST", 
     url: "UFZillaErrorStatus.aspx/GetErrorStatusList", 
     data: serve, 
     contentType: "application/json; charset=utf-8", 
     dataType: "json", 
     success: function (response) { 

     }, 
     error: function() { alert("Server Error!!");} 

    }); 
+0

예. 작동했습니다 ... 감사합니다. –

0

나는 생각한다 문제는 서비스의 매개 변수 때문입니다. 서비스가 GET 메소드를 제공하도록 작성되었지만 POST 메소드로 시도 중이며 본문에 데이터를 전송 중입니다.

은 아래 URL을 매개 변수로 데이터를 보내기 :

은 다음을 시도해보십시오

function getErrorStatusList() { 
    $.ajax({ 
     type: "GET", 
     url: "UFZillaErrorStatus.aspx/GetErrorStatusList/?issueID="+$("#proselct option:selected").val(), 
     dataType: "json", 
     success: function (response) { 

    }, 
    error: function() { alert("Server Error!!");} 

    }); 
} 

당신이 시도 할 때 당신이지고있는 것을 출력 말해.