0
我在MVC Web應用程序的根文件夾中創建了一個WebService目錄,並創建了一個名爲MyService.asmx的webservice。在這個文件中,我創建了一個方法UpdateReadCount,我使用下面的代碼從javascript調用。使用jquery調用webservice方法時找不到頁面錯誤
function updateReadCount(contentID) {
$.ajax({
type: "POST",
url: "/WebServices/MyService.asmx/UpdateReadCount",
data: "{'contentID': '" + contentID + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (json) {
//$("#" + messageView).html(json.d);
}
});
}
我收到Page Not Found錯誤。這發生在託管頁面,而它在本地主機上完美工作。
它可能是主要的域名或網址isssue check in webconsole – 2012-08-18 22:29:30