473,769 Members | 6,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1499
Have a look at session.timeout
"Chase" <Ch***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.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***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.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"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
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_Sta rt
Session_Start
Session_End
Application_End

After running the application, only one file was written: Application_Sta rt
(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***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.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_OnS tart events are firing:

In global.asax, in Application_OnS tart ( you can also use Application_Sta rt )

Application("AP P_START_TIME") = DateTime.Now

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

Session.Content s("AppStartTime ") = Now

Then, in your test page, use :

Sub Page_Load(Sende r As System.Object, E As System.EventArg s)
Label1.Text = "The application's start time was : " & Application("AP P_START_TIME")
Label2.Text = "The session's start time was : " & Session("AppSta rtTime")
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***@discussi ons.microsoft.c om> wrote in message
news:50******** *************** ***********@mic rosoft.com...
Thanks for the suggestion!

In my web.config for my Visual Studio project I modified the timout
attribute as follows:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
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_Sta rt
Session_Start
Session_End
Application_End

After running the application, only one file was written: Application_Sta rt
(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***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.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 enableSessionSt ate 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_OnS tart events are firing:

In global.asax, in Application_OnS tart ( you can also use Application_Sta rt )

Application("AP P_START_TIME") = DateTime.Now

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

Session.Content s("AppStartTime ") = Now

Then, in your test page, use :

Sub Page_Load(Sende r As System.Object, E As System.EventArg s)
Label1.Text = "The application's start time was : " & Application("AP P_START_TIME")
Label2.Text = "The session's start time was : " & Session("AppSta rtTime")
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***@discussi ons.microsoft.c om> wrote in message
news:50******** *************** ***********@mic rosoft.com...
Thanks for the suggestion!

In my web.config for my Visual Studio project I modified the timout
attribute as follows:
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
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_Sta rt
Session_Start
Session_End
Application_End

After running the application, only one file was written: Application_Sta rt
(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***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
2983
by: theodp | last post by:
Not to be outdone by Amazon's 1-Click patent, Microsoft snagged a patent from the USPTO Tuesday for a 'Time based hardware button for application launch', which covers causing different actions to occur depending upon whether a button is pressed for a short period of time, a long period of time, or multiple times within a short period of time. So does pressing car radio buttons for different periods of time to change or set stations...
13
2858
by: BK | last post by:
Can someone point me to a code sample that illustrates executing long running tasks (asynchronous) from a web application in ASP.NET? I assume that Web Services might come into play at some point, but I'm not sure how to get started. For example, I have an application that, upon a user initiating through a button or link click, will go out and generate a bunch of files (this could take several minutes). This will happen in batches, so I...
17
3948
by: Adam Ierymenko | last post by:
I have a question that might have been asked before, but I have not been able to find anything via groups.google.com or any web search that is definative. I am writing an evolutionary AI application in C++. I want to use 32-bit integers, and I want the application to be able to save it's state in a portable fashion. The obvious choice would be to use the "long" type, as it is deined to be at least 32 bits in size. However, the...
6
6160
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but my mappings between named colors, HEX values and the Long Integer values used in Access are not jibbing. Anyone have a nice list laying around? Danny J Lesandrini dlesandrini@hotmail.com
5
4813
by: Mark Shelor | last post by:
Problem: find a portable way to determine whether a compiler supports the "long long" type of C99. I thought I had this one solved with the following code: #include <limits.h> #ifdef ULONG_LONG_MAX
18
2210
by: Larry Herbinaux | last post by:
I'm having issues with garbage collection with my long-standing service process. If you could review and point me in the right direction it would be of great help. If there are any helpful documents that you could point me to help me control the GC, then that would be great also. The .Net GC does not cleanup memory of our service process unless it is forced to by another process that hogs memory. · GC Algorithm - This is an issue...
0
2207
by: Slawomir Nasiadka | last post by:
Hi, I'am new to this group so I would like to say "Hello" everyone and here is my problem: I'm writing a simple application (code is at the end of this message) witch would list all mails from a directory from Outlook Express. I have: - OE 6.0 - .NET Framework 1.1 - interface definition language for OE 6.0 - msoeapi.idl
3
4352
by: lai_waiman | last post by:
Dear All, I have problems on doing some long lasting job in a web services. Let me first provide some background information first. I have a ASP.NET web page, which will call another Web Services to preform a task. Since that Web Service Task last for a quiet long time (eg. 1 hr). If I return the result after the long task, I am sure that the client browser will be timeout. So I decided to use threading inside the Web Service. My...
14
23170
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
0
2293
by: vinodhnair | last post by:
I am trying to link my C++ application (Solaris) to 32 bit libraries of ORACLE 10G. But the application gives the following error in oratypes.h: "rdbms/public/oratypes.h:152: warning: ISO C++ does not support `long long' " When I checked ORATYPES.H, I noticed the following lines there: # ifdef _LP64 typedef unsigned long oraub8; typedef signed long orasb8;
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.