2014-03-13 2 views
0

wcf webservice를 만들었으며 브라우저에서 액세스하고 있습니다. 다음은 내가하고있는 json 요청입니다.IE에서 무단 오류 Jason

$.ajax(
{ 
    type: "POST", 
    url: podServiceUrl + "/GetTestPodItems", 
    cache: false, 
    contentType: "application/json; charset=utf-8;", 
    dataType: "json", 
    success: function (msg) { 
     var text = JSON.parse(msg.d); 
     alert(text); 
    }, 
    error: function (xhr, status, error) { 
     console.log(xhr); 
     console.log(xhr.status); 
     console.log(error); 
     return; 
    } 
} 
); 

크롬 및 Firefox에서는 정상적으로 작동하지만 IE에서는 인증되지 않은 오류를 반환합니다. 다음은 xhr 객체의 상태입니다.

responseText : "{"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"}" 
status : 401 
json response : System.InvalidOperationException 

이 문제점의 가능한 원인은 무엇입니까?

+0

서비스 계약을 공유 할 수 있습니까? –

+0

[WebServiceBinding (ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService]를 사용 중입니다. – KasunKP

답변

0

일관된 크로스 브라우저 구현을 위해 json2를 사용하십시오.

+0

json2를 추가 한 후에도 오류가 계속 발생합니다. – KasunKP