[英]ASp.net MVC Long running controller task
My Controller action takes long time to run (expected). 我的控制器动作需要很长时间才能运行(预期)。 In the below code ,
在下面的代码中,
ProcessImportFileAPI(HoldAPI)
timesout after 1 hour. 1小时后超时。
public JsonResult DataFileUpload(string positionDate)
{
// Reset validation error collection
ImportDataValidationErrors = new List<ImportFileRecord>();
string[] errs;
try
{
var HoldAPI = "SomeAPI"
retDictAPI = ProcessImportFileAPI(HoldAPI);
string ReturnVal = "Import is successful";
return Json(ReturnVal); //never return because of TIMEOUT.
}
Controller action is performing all taks correctly, but I am unable to return value back to view because of timeout. 控制器操作正在正确执行所有任务,但是由于超时,我无法将值返回给查看。 How can I solve this?
我该如何解决? any pointers?
有指针吗?
我使用异步控制器来解决我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.