我正在尝试从ASP.NET MVC控制器下载一个100 it的文件,但在3-4分钟后就会超时(它是不同的)。
public ActionResult DownloadMyFile() {
Server.ScriptTimeout = 60 * 60; // 1 hr timeout for downloading myfile
Response.AddHeader("Content-Disposition", "attachment; filename=myfile");
Response.BufferOutput = false;
this.CloudBlobContainer
.GetBlobReference("myfile")
.DownloadToStream(Response.OutputStream);
return new EmptyResult();
}发布于 2013-07-24 22:56:09
您可以尝试增加web.config中的执行超时。
以下内容将超时时间更改为1小时(3600秒):
<system.web>
<httpRuntime
executionTimeout="3600"
/>默认为110秒。
https://stackoverflow.com/questions/17846020
复制相似问题