2013-10-25 19 views
0

我已将脚本超时设置为20分钟,用于我的ajax请求。 10米5秒后,我的请求超时。我在这里做错了什么?我怎样才能让这个更好?我正在测试对临时数据库的功能,这是一个非常慢的服务器。脚本超时MVC 2和jquery xhr.responseText为空

Server.ScriptTimeout = 1200; 

此时xhr.responseText也是空白的。

$.ajax({ 
       cache: false, 
       url: url, 
       type: Ajax.MethodType.POST, //global.vars.js 
       data: { estimateId: estimateId, random: Math.random() }, 
       error: function (xhr, ajaxOptions, thrownError) { 

        jMessageError(xhr.responseTex, $click, false, true); 

       }, 
       success: function (result) { 
         //display the count 
         $("#" + enumFormFields.hiddenCountNumberId).val(result.Message); 
         $("#" + enumDashboard.estimateVolumeId).html(result.Message); 

       } 
      }); 
+0

有什么建议? –

回答

0

我指定的AJAX超时20分钟,它仍然没有同样的

$.ajax({ 
       cache: false, 
       url: url, 
timeout: 1000 * 60 * 20, //20 mins 
       type: Ajax.MethodType.POST, //global.vars.js 
       data: { estimateId: estimateId, random: Math.random() }, 
       error: function (xhr, ajaxOptions, thrownError) { 

        jMessageError(xhr.responseTex, $click, false, true); 

       }, 
       success: function (result) { 
         //display the count 
         $("#" + enumFormFields.hiddenCountNumberId).val(result.Message); 
         $("#" + enumDashboard.estimateVolumeId).html(result.Message); 

       } 
      });