executionTimeout on a per request basis

M

muriwai

Hi,

I have a page that handles file downloads, and sometimes it fails with
"Request timed out", apparently because it takes more than the default 90
seconds to stream out the file. I don't want setting executionTimeout in the
config file. Is there a way to set the execution timeout for individual
requests?

Thanks

--
 
W

Walter Wang [MSFT]

Hi,

You can use Server.ScriptTimeout to change the request's executing timeout
value:

protected void button1_Click(object sender, EventArgs e)
{
Page.Server.ScriptTimeout = 120; // seconds
Thread.Sleep(100 * 1000);
}


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top