Timeout Expired

R

rn5a

I am working on Win2K Pro (SP4) with P4 2.80GHz, 256MB RAM & 20GB hard
disk (IIS5.0). I use Visual Web Developer 2005 Express Edition to
create & edit ASP.NET apps.

Whenever I log in to my m/c. & run any ASPX page in IE6.0 for the very
first time, I always get the following timeout expired error:

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.

even if the ASPX code happens to be as simple as this:

<script runat="server">
Sub Page_Load(obj As Object, ea As EventArgs)
lblMsg.Text = "Hello World"
End Sub
</script>
<form runat="server">
<asp:Label ID="lblMsg" runat="server"/>
</form>

It is only when I refresh the page that the ASPX page gets executed
successfully & thereafter, I don't encounter this timeout expired error
any more. Let me iterate that this error gets generated only the first
time I open any ASPX page after logging in to my m/c.

What could be the cause of this eccentric behavior?

The timeout period in IIS is set to the default 90 seconds.
 
R

rn5a

Mark, I think you are right. When I commented out the code in
Application_Start in Global.asax, I am no longer get the timeout error
when I run a ASPX page for the first time in IE but the only 1-line
code I had in the Application_Start is this:

Application("AppStartTime") = System.DateTime.Now

Is this an inefficient code? I don't think so. How could this 1-line
code be the one & only reason for ASP.NET to generate the timeout
error?
 
M

Mark Rae

Mark, I think you are right. When I commented out the code in
Application_Start in Global.asax, I am no longer get the timeout error
when I run a ASPX page for the first time in IE but the only 1-line
code I had in the Application_Start is this:

Application("AppStartTime") = System.DateTime.Now

Is this an inefficient code? I don't think so.

Well, not at first glance anyway...
How could this 1-line code be the one & only reason for ASP.NET
to generate the timeout error?

I'm afraid I don't know...

Try replacing the line with the following and see which, if any, exhibits
the same behaviour:

1) string strTest = String.Empty:

2) Application["strTest"] = String.Empty;

3) DateTime dtmTest = new DateTime(2006, 12, 5);

4) Application["dtmTest"] = new DateTime(2006, 12, 5);

5) DateTime dtmTest = System.Date.Now;

6) DateTime dtmTest = System.Date.Now;
Application["dtmTest"] = dtmTest.


Remember to recycle the app each time to force Application_Start to fire.
 

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

Similar Threads

Timeout expired problem 4
Timeout expired 2
System.Exception: Timeout expired. 0
Timeout expired 0
Timeout Expired Error - Please help 0
Timeout expired 1
SqlException: Timeout expired 4
Timeout expired 2

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,061
Latest member
KetonaraKeto

Latest Threads

Top