472,119 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How long can my asp.net application run for?

I'm pretty new to asp.net and am having problems with my application timing
out.

I've written an application that loops through all of the information on an
excel spreadsheet and does certain things with it, like creating and
configuring WSS sites.

My application runs fine for approximately 25 minutes, then I get the 'Page
cannot be displayed' error. It seems like my browser times out before the
application can finish what its doing.

What settings should I be checking? Are there asp.net settings I need to
configure, or is my browser the culprit (does it think the page is never
going to load and just time out)?

Thanks for any help!

- Chase
Nov 19 '05 #1
6 1414
Have a look at session.timeout
"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I'm pretty new to asp.net and am having problems with my application timing out.

I've written an application that loops through all of the information on an excel spreadsheet and does certain things with it, like creating and
configuring WSS sites.

My application runs fine for approximately 25 minutes, then I get the 'Page cannot be displayed' error. It seems like my browser times out before the
application can finish what its doing.

What settings should I be checking? Are there asp.net settings I need to
configure, or is my browser the culprit (does it think the page is never
going to load and just time out)?

Thanks for any help!

- Chase

Nov 19 '05 #2
Web pages were never really designed to run for so long.
I'd suggest you have a windows service execute the functionality
asynchronously.
When it finishes, it can set a flag and the user can check back every so
often to see the status.
You could set a page that automatically refreshes every so often to display
an ongoing status report.

Here's more info on Windows Services:
http://msdn.microsoft.com/library/de...plications.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I'm pretty new to asp.net and am having problems with my application
timing
out.

I've written an application that loops through all of the information on
an
excel spreadsheet and does certain things with it, like creating and
configuring WSS sites.

My application runs fine for approximately 25 minutes, then I get the
'Page
cannot be displayed' error. It seems like my browser times out before the
application can finish what its doing.

What settings should I be checking? Are there asp.net settings I need to
configure, or is my browser the culprit (does it think the page is never
going to load and just time out)?

Thanks for any help!

- Chase

Nov 19 '05 #3
Thanks for the suggestion!

In my web.config for my Visual Studio project I modified the timout
attribute as follows:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="240"
/>

Also, in IIS Manager I right clicked on the folder in which my application
lives, went to properties, on the Directory tab I clicked on the
Configuration button, went to the options tab and changed the Session timeout
from the default 20 to 240.

Rebuilt my application, restarted IIS and ran my application again. I still
didn't make it past the ~25 min mark, and got the same page cannot be
displayed error.

In an attempt to troubleshoot what might be causing the problem I added code
in my global.asax.cs to write a text file with the system time in it for the
following events:
Application_Start
Session_Start
Session_End
Application_End

After running the application, only one file was written: Application_Start
(which leads me to believe the session_start/end and application_end events
never occured).

Any other ideas?

Thanks all for your time!

- Chase
"Clamps" wrote:
Have a look at session.timeout
"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I'm pretty new to asp.net and am having problems with my application

timing
out.

I've written an application that loops through all of the information on

an
excel spreadsheet and does certain things with it, like creating and
configuring WSS sites.

My application runs fine for approximately 25 minutes, then I get the

'Page
cannot be displayed' error. It seems like my browser times out before the
application can finish what its doing.

What settings should I be checking? Are there asp.net settings I need to
configure, or is my browser the culprit (does it think the page is never
going to load and just time out)?

Thanks for any help!

- Chase


Nov 19 '05 #4
Hi, Chase.

Your application could be recycling at 25 minutes due to other settings.

Check your Application Pool's recyclying settings.
( IIS Manager, scroll on the left to Application Pools,
and right click --> select "Properties". )

Look for any short time periods in the recycling tab.

Try this to check whether the Session_OnStart
and Application_OnStart events are firing:

In global.asax, in Application_OnStart ( you can also use Application_Start )

Application("APP_START_TIME") = DateTime.Now

And, in global.asax, in Session_OnStart ( you can also use Session_Start )

Session.Contents("AppStartTime") = Now

Then, in your test page, use :

Sub Page_Load(Sender As System.Object, E As System.EventArgs)
Label1.Text = "The application's start time was : " & Application("APP_START_TIME")
Label2.Text = "The session's start time was : " & Session("AppStartTime")
End Sub

And, in the body of your test page :

<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server"></asp:Label><br />
<asp:Label ID="Label2" Runat="server"></asp:Label><br />
</div>
</form>

Let us know whether both events are reported.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
Thanks for the suggestion!

In my web.config for my Visual Studio project I modified the timout
attribute as follows:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="240"
/>

Also, in IIS Manager I right clicked on the folder in which my application
lives, went to properties, on the Directory tab I clicked on the
Configuration button, went to the options tab and changed the Session timeout
from the default 20 to 240.

Rebuilt my application, restarted IIS and ran my application again. I still
didn't make it past the ~25 min mark, and got the same page cannot be
displayed error.

In an attempt to troubleshoot what might be causing the problem I added code
in my global.asax.cs to write a text file with the system time in it for the
following events:
Application_Start
Session_Start
Session_End
Application_End

After running the application, only one file was written: Application_Start
(which leads me to believe the session_start/end and application_end events
never occured).

Any other ideas?

Thanks all for your time!

- Chase
"Clamps" wrote:
Have a look at session.timeout
"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
> I'm pretty new to asp.net and am having problems with my application

timing
> out.
>
> I've written an application that loops through all of the information on

an
> excel spreadsheet and does certain things with it, like creating and
> configuring WSS sites.
>
> My application runs fine for approximately 25 minutes, then I get the

'Page
> cannot be displayed' error. It seems like my browser times out before the
> application can finish what its doing.
>
> What settings should I be checking? Are there asp.net settings I need to
> configure, or is my browser the culprit (does it think the page is never
> going to load and just time out)?
>
> Thanks for any help!
>
> - Chase


Nov 19 '05 #5
Good Morning Juan, Thanks for the suggestions!

I added code as you suggested below to my project. When I navigated to my
page with the application on it I received the following error:
"Session state can only be used when enableSessionState is set to true,
either in a configuration file or in the Page directive "

Which leads me to believe... that the session state is not what is holding
me up at 20 minutes.

I also checked the application pool recycle settings as you suggested. The
only setting that is checked is 'Recycle worker processes at the following
times: 01:48'

Any other suggestions are greatly appreciated!
Thanks for your time!

- Chase

"Juan T. Llibre" wrote:
Hi, Chase.

Your application could be recycling at 25 minutes due to other settings.

Check your Application Pool's recyclying settings.
( IIS Manager, scroll on the left to Application Pools,
and right click --> select "Properties". )

Look for any short time periods in the recycling tab.

Try this to check whether the Session_OnStart
and Application_OnStart events are firing:

In global.asax, in Application_OnStart ( you can also use Application_Start )

Application("APP_START_TIME") = DateTime.Now

And, in global.asax, in Session_OnStart ( you can also use Session_Start )

Session.Contents("AppStartTime") = Now

Then, in your test page, use :

Sub Page_Load(Sender As System.Object, E As System.EventArgs)
Label1.Text = "The application's start time was : " & Application("APP_START_TIME")
Label2.Text = "The session's start time was : " & Session("AppStartTime")
End Sub

And, in the body of your test page :

<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server"></asp:Label><br />
<asp:Label ID="Label2" Runat="server"></asp:Label><br />
</div>
</form>

Let us know whether both events are reported.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.com...
Thanks for the suggestion!

In my web.config for my Visual Studio project I modified the timout
attribute as follows:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="240"
/>

Also, in IIS Manager I right clicked on the folder in which my application
lives, went to properties, on the Directory tab I clicked on the
Configuration button, went to the options tab and changed the Session timeout
from the default 20 to 240.

Rebuilt my application, restarted IIS and ran my application again. I still
didn't make it past the ~25 min mark, and got the same page cannot be
displayed error.

In an attempt to troubleshoot what might be causing the problem I added code
in my global.asax.cs to write a text file with the system time in it for the
following events:
Application_Start
Session_Start
Session_End
Application_End

After running the application, only one file was written: Application_Start
(which leads me to believe the session_start/end and application_end events
never occured).

Any other ideas?

Thanks all for your time!

- Chase


"Clamps" wrote:
Have a look at session.timeout
"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
> I'm pretty new to asp.net and am having problems with my application
timing
> out.
>
> I've written an application that loops through all of the information on
an
> excel spreadsheet and does certain things with it, like creating and
> configuring WSS sites.
>
> My application runs fine for approximately 25 minutes, then I get the
'Page
> cannot be displayed' error. It seems like my browser times out before the
> application can finish what its doing.
>
> What settings should I be checking? Are there asp.net settings I need to
> configure, or is my browser the culprit (does it think the page is never
> going to load and just time out)?
>
> Thanks for any help!
>
> - Chase


Nov 19 '05 #6
In IIS, right-click the "Default Web Sites" tree item, in the "Web
Site" tab, set the "Connection timeout" to your expected time( 25 mins
e.g.).
Hope it can work.
Thanks.

-Guomao

Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Adam Ierymenko | last post: by
5 posts views Thread by Mark Shelor | last post: by
18 posts views Thread by Larry Herbinaux | last post: by
reply views Thread by Slawomir Nasiadka | last post: by
3 posts views Thread by lai_waiman | last post: by

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.