第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么Ajax腳本不在IIS 7.5 Win 2008 R2服務(wù)器上運行?

為什么Ajax腳本不在IIS 7.5 Win 2008 R2服務(wù)器上運行?

暮色呼如 2019-06-25 10:58:19
為什么Ajax腳本不在IIS 7.5 Win 2008 R2服務(wù)器上運行?我有一個Web應(yīng)用程序在我的開發(fā)服務(wù)器上的VS 2013上運行良好,但是一旦我在IIS 7.5 2008 R2服務(wù)器上發(fā)布了它,位于我的自定義腳本文件中的Ajax腳本就不再工作了,盡管其他不調(diào)用Ajax的JQuery腳本確實正常工作。為了讓Ajax在服務(wù)器上工作,還有什么需要做的嗎?我讀過一些有關(guān)的帖子,但還沒有找到答案。我在IIS和Ajax方面的經(jīng)驗有限。/最新情況:我已經(jīng)知道Ajax腳本是可行的,問題最有可能出現(xiàn)在下面的行中:“url:‘/home/GetRates’,/URL用于請求”使用調(diào)試器,我發(fā)現(xiàn)在遠程服務(wù)器中沒有調(diào)用GetRates()函數(shù),盡管它位于本地(VS 2013)開發(fā)服務(wù)器中。唯一不同的是,我看到的是道路,但不知道如何修復(fù)它。下面是Ajax腳本:// Retrieve rates and update partial view$(function () {     $('#reservSearch').submit(function () {         if ($(this).valid()) {             $("#theModal").modal("show");              // Display the in progress.....             $.ajax({                 url: '/Home/GetRates',                 // URL for the request                  data: $("#reservSearch").serialize(),  // the data to send (will be converted to a query string)                 type: "POST",                          // whether this is a POST or GET request                   dataType: 'html',                      // the type of data we expect back                    success: function (data) {   // code to run if the request succeeds; The response is passed to the function                     $("#theModal").modal("hide");      // Close the in progress modal.....                     $('#ratesView').html(data);        // Fill div with results                 },                 error: function (xhr, status) {                         // code to run if the request fails; the raw request and status codes are passed to the function                     $("#theModal").modal("hide");      // Close the in progress modal.....                     alert('Error: Retrieving parking rates' + "</br>" + xhr.error);                 }             });         }//        // it is important to return false in order to cancel the default submission of the form and perform the AJAX call         return false;     });});
查看完整描述

2 回答

?
天涯盡頭無女友

TA貢獻1831條經(jīng)驗 獲得超9個贊

如何調(diào)試Ajax調(diào)用

完整的答案分散在對OP問題的評論中,但我認為這個問題最有幫助:

  1. 轉(zhuǎn)到進行ajax調(diào)用的網(wǎng)頁
  2. 在鉻壓機F12中
  3. 轉(zhuǎn)到“網(wǎng)絡(luò)”選項卡
  4. 通過提交表單#ReservSearch激活A(yù)jax調(diào)用
  5. 在“網(wǎng)絡(luò)”選項卡中,查找對/home/GetRates的調(diào)用
  6. 點擊它
  7. 檢查預(yù)覽和響應(yīng)選項卡,查看服務(wù)器的輸出
  8. 它是否顯示您的Ajax調(diào)用正在偵聽的預(yù)期HTML數(shù)據(jù)?


查看完整回答
反對 回復(fù) 2019-06-25
?
SMILET

TA貢獻1796條經(jīng)驗 獲得超4個贊

對于任何使用Firefox的人,您都可以在Firefox上做同樣的事情,在Firefox中也可以按F12鍵

查看完整回答
反對 回復(fù) 2019-06-25
  • 2 回答
  • 0 關(guān)注
  • 813 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號