473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASP.NET Server.ScriptTimeout being ignored

I've created an aspx page that should time out every time it is executed, yet it never does. It seems as though the value of Server.ScriptTimeout is just being ignored by asp.net - I've also set executionTimeout in Machine.Config and Web.Config to = "3", which is also being ignored. I've tried rebooting, iisreseting, begging, and pleading. Can someone please tell me what I'm doing wrong

WebForm1.aspx.c

using System
using System.Collections
using System.ComponentModel
using System.Data
using System.Drawing
using System.Web
using System.Web.SessionState
using System.Web.UI
using System.Web.UI.WebControls
using System.Web.UI.HtmlControls

namespace MyWebAp

/// <summary
/// Summary description for WebForm1
/// </summary
public class WebForm1 : System.Web.UI.Pag

private void Page_Load(object sender, System.EventArgs e

//Set timeout to three second
Server.ScriptTimeout = 3
//Sleep for five second
System.Threading.Thread.Sleep(new TimeSpan(0,0,0,5,0))
//Why does it make it this far!
#region Web Form Designer generated cod
override protected void OnInit(EventArgs e

/
// CODEGEN: This call is required by the ASP.NET Web Form Designer
/
InitializeComponent()
base.OnInit(e)
/// <summary
/// Required method for Designer support - do not modif
/// the contents of this method with the code editor
/// </summary
private void InitializeComponent(
{
this.Load += new System.EventHandler(this.Page_Load)

#endregio


WebForm1.asp
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="MyWebApp.WebForm1" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML><HEAD><title>WebForm1</title><meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"><meta name="CODE_LANGUAGE" Content="C#"><meta name="vs_defaultClientScript" content="JavaScript"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"></HEAD><body MS_POSITIONING="GridLayout"><form id="Form1" method="post" runat="server"
"Hello, I'm Jello.
</form></body></HTML>
Nov 18 '05 #1
1 3186
What gives away that it is not expiring? The fact that the page still sits
on the client? If so, that is normal. To explicitly change the page,you will
have to use client script, as there is not a connection to the server after
the page is Requested.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
"Chris" <xyz@nospam@bovac@massdor.@..com> wrote in message
news:B6**********************************@microsof t.com...
I've created an aspx page that should time out every time it is executed, yet it never does. It seems as though the value of Server.ScriptTimeout is
just being ignored by asp.net - I've also set executionTimeout in
Machine.Config and Web.Config to = "3", which is also being ignored. I've
tried rebooting, iisreseting, begging, and pleading. Can someone please tell
me what I'm doing wrong?
WebForm1.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace MyWebApp
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
//Set timeout to three seconds
Server.ScriptTimeout = 3;
//Sleep for five seconds
System.Threading.Thread.Sleep(new TimeSpan(0,0,0,5,0));
//Why does it make it this far!?
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion

}
}

WebForm1.aspx
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="MyWebApp.WebForm1" %><!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN"<HTML><HEAD><title>WebForm1</title><meta name="GENERATOR" Content="Microsoft Visual Studio 7.0"><meta name="CODE_LANGUAGE"
Content="C#"><meta name="vs_defaultClientScript" content="JavaScript"><meta
name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5"></HEAD><body
MS_POSITIONING="GridLayout"><form id="Form1" method="post" runat="server"> "Hello, I'm Jello."
</form></body></HTML>

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul | last post by:
Any code that accesses the Server object appears to break, such as: Set conn = Server.CreateObject("ADODB.Connection") OR Response.Write(Server.ScriptTimeout & " seconds") Thanks Paul ***...
5
by: Bryan | last post by:
I'm looking for a definitive answer to a Server.ScriptTimeout question. if I add <% Server.ScriptTimeout = 300 %> to a page, does that then alter the default 90 second script timeout for ALL...
4
by: A.S. | last post by:
I have an app that gets data from SQL Server and writes it to a csv file. My problem is that my query returns 25K + records. IE seems to 'hang' and the csv file never gets created. Any Ideas how I...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
3
by: Hermes | last post by:
Hi All, Is there a way to specify the server timeout for IIS in an asp file rather than with IIS. As I would just want one page to have a long timeout period but limit the other pages in the...
0
by: g_sharad | last post by:
Hi I am trying to use the server.scriptimeout for my asp code for sending the mails to my 1000 odd subscribers But after approx 150 records the script gives an error... saying pls reset the...
6
by: Anthony Williams | last post by:
Hi all, Am I right in thinking that if I set Server.ScriptTimeout to, say, 600 that every request for an .ASPX page will wait up to 600 seconds before responding with a "Request Timed Out"...
0
by: srt | last post by:
Hi, I have some problems with setting Server.ScriptTimeout. The posted script doesn't stop after 120 seconds (the timestamps are displayed after the 120 seconds and I stopped the server after 5...
20
by: =?Utf-8?B?SnVzdGluIERvaA==?= | last post by:
"Active Server Pages error 'ASP 0113' Script timed out" I am still getting this error, and I am not sure how I could fix this. When I execute the query at SQL 2005, it only takes 8 seconds....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.