$.ajax({
type: "POST",
async: false,
url: url,
data: dataParameters,
contentType: "application/json; charset=utf-8",
success: function (msg) {
//
},
error: function (xhr, ajaxOptions, thrownError) {
//
}
});
在我的本地使用的一切時,這是好的,但在主機其返回調用asp.net 4.5 Web服務將返回302重定向到默認頁面
[HTTP/1.1 302 Found 278ms]
我的WS功能:
[WebMethod(EnableSession = true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string SomeFunction(int something) {
//
}
您的主機是否有任何HTTP請求過濾器? (標題或別的東西你不會發送到這裏) – cubitouch
@cubitouch:我不知道。其plesk控制面板。它在哪裏? – Raika
我不知道這個控制面板,你可以嘗試在Web服務中添加路徑和模擬HTTP請求到您的web服務的目標,看看結果是一樣的嗎? (爲了確定是「客戶端」以某種方式阻止) – cubitouch