增加 .ashx 文件的超时时间

7

简单问题: 我需要增加一个ashx的超时时间。

1个回答

13
你可以增加服务器的超时时间:

你可以增加服务器的超时时间:

public void ProcessRequest(HttpContext context)
    {
        context.Server.ScriptTimeout = 3600;
        context.Response.ContentType = "text/plain";
        context.Response.Write("Hello World");
    }

6
真的有效吗?它不会覆盖所有页面的脚本超时设置以及 web.config 中的设置吗? - Patrik Svensson

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接