작동하지 JSONP 안녕하세요 문제가 :
내 로컬 컴퓨터의 모든 괜찮지 만, 나는 내 서버에서 실행 때 나에게 오류를 보여줍니다 JSONP를 사용하여 Ajax 호출을 수행 할 때
내가 오류 코드와 세부 정보를 표시 아래 :서버
$.ajax({
data: { info: JsonString },
contentType: 'application/json; charset=utf-8',
dataType: "jsonp",
/*url: jsondata.Ruta + "/LanzarAplicativo/",*/
url: 'http://localhost:1143/contenido/LanzarAplicativo/',
success: function (result) {
console.log(result);
},
error: function (xhr, status, error) {
//some code
}
});
이 아약스에서 지정한 방법은
[HttpGet]
public ActionResult LanzarAplicativo(string info)
{
Informacion info;
info = JsonConvert.DeserializeObject<Informacion>(info);
Session["miContexto"] = informacion ;
//some code
return View();
}
나는 AJA의 URL이 동일하지만, 변화를 수행 할 때 X 크롬 콘솔 (내 IIS 서버의 URL에서) 나에게 다음과 같은 오류가 발생합니다 :
Failed to load resource: the server responded with a status of 404 (Not Found) http://someUrlmyserver/Plataform/Demo/Contenido/LanzarAplicativo/…%2C%2232%22%3A%22calipso%22%2C%2233%22%3A%22summer%22%7D%7D%7D%7D&_=1382717706500
이 URL 인해 매개 변수의 수에 매우 긴하다 아약스 호출에서 제공됩니다.
가 나는 문제는 URL의 크기가 될 수 있다고 생각하지만 난모든 아이디어를 내 로컬 호스트에서 실행으로 그 문제도 가야하나요?
감사
http get 및 post 프로토콜을 config에 포함 시켰습니까? – Saranya