0
此代碼在Visual Studio中運行,但不在IIS中運行。Ajax請求在IIS中不起作用
$('#addMessage').click(function() {
var textMessage = $('#ticketMessage').val();
var isInternal = $('#isInternal')[0].checked;
var ticketID = $('#TicketID').val();
$.ajax({
url: '/Ticket/AddMessage',
type: 'POST',
data: { textMessage: textMessage, isInternal: isInternal, ticketID: ticketID },
success: function (data) {
var tbody = $('#allMessages').children()[0];
tbody.innerHTML = tbody.innerHTML + data;
$('#ticketMessage').val("");
$('#isInternal')[0].checked = false;
}
});
});
在這段代碼中修正ajax請求在IIS中正常運行的內容?
是應用程序正坐在一個IIS應用程序或虛擬文件夾? –