ScriptTimeout

Discussion in 'ASP .Net' started by Ted Burhan, Nov 21, 2003.

  1. Ted Burhan

    Ted Burhan Guest

    Can anyone please explain to me what Server.ScriptTimeout actually is?
    I don't quite understand the explanation in the documentation.

    In my aspx page, I typed in the following codes:

    private void Page_Load(object sender, System.EventArgs e)

    {

    Server.ScriptTimeout = 2;

    for (int i = 0;i < 10;i++)
    Thread.Sleep(1000);

    }

    but the request wasn't timed out. So I figure that
    I must be misunderstanding something here.
    Anyone please...

    Ted
     
    Ted Burhan, Nov 21, 2003
    #1
    1. Advertising

  2. Ted Burhan

    SSW Guest

    Hi!

    Server.ScriptTimeout = NumSeconds

    A default ScriptTimeout can be set for a Web service or Web server by using
    the AspScriptTimeout metabase property. The ScriptTimeout property cannot be
    set to a value less than that specified in the metabase. For example, if
    NumSeconds is set to 10, and the metabase setting contains the default value
    of 90 seconds, scripts will time out after 90 seconds. However, if
    NumSeconds were set to 100, the scripts would time out after 100 seconds.

    Thread.Sleep(1000); // Thread sleeps for 1 Sec ie. 1000 Millisec
    Below is sample: Script time out( Thread Sleep for 500 Second greater the 90
    Second)
    private void Page_Load(object sender, System.EventArgs e)
    {
    Server.ScriptTimeout = 90;
    for (int i = 0;i < 500;i++)
    Thread.Sleep(1000);
    }

    Below is sample: Script time Don't time out( Thread Sleep for 50 Second less
    the 90 Second)
    private void Page_Load(object sender, System.EventArgs e)
    {
    Server.ScriptTimeout = 90;
    for (int i = 0;i < 50;i++)
    Thread.Sleep(1000);
    }

    HTH

    Thanks,

    sswalia
    MCSD, MCAD, OCA

    "Ted Burhan" <> wrote in message
    news:u3IloX#...
    > Can anyone please explain to me what Server.ScriptTimeout actually is?
    > I don't quite understand the explanation in the documentation.
    >
    > In my aspx page, I typed in the following codes:
    >
    > private void Page_Load(object sender, System.EventArgs e)
    >
    > {
    >
    > Server.ScriptTimeout = 2;
    >
    > for (int i = 0;i < 10;i++)
    > Thread.Sleep(1000);
    >
    > }
    >
    > but the request wasn't timed out. So I figure that
    > I must be misunderstanding something here.
    > Anyone please...
    >
    > Ted
    >
    >
     
    SSW, Nov 21, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anthony Williams
    Replies:
    8
    Views:
    6,214
    Matt Yaeger
    Aug 26, 2004
  2. =?Utf-8?B?Q2hyaXM=?=

    ASP.NET Server.ScriptTimeout being ignored

    =?Utf-8?B?Q2hyaXM=?=, May 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    5,445
    Cowboy \(Gregory A. Beamer\)
    May 14, 2004
  3. =?Utf-8?B?c3J0?=

    Issues with Server.ScriptTimeout

    =?Utf-8?B?c3J0?=, Sep 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    632
    =?Utf-8?B?c3J0?=
    Sep 1, 2004
  4. =?Utf-8?B?TXVkcGll?=

    How do I capture a ScriptTimeOut in C#?

    =?Utf-8?B?TXVkcGll?=, Dec 23, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    978
    =?Utf-8?B?TXVkcGll?=
    Dec 23, 2004
  5. Arsen V.
    Replies:
    3
    Views:
    15,507
    Steven Cheng[MSFT]
    May 4, 2005
Loading...

Share This Page