PC Review


Reply
Thread Tools Rate Thread

Application_Start

 
 
Joey
Guest
Posts: n/a
 
      27th Sep 2007
asp.net 2/C#

I have noticed that during periods of inactivity on my website, the
Application_Start event is firing about every 40-45 minutes. Is this
normal? Shouldn't the app start once and remain running until I stop
it?

JP

 
Reply With Quote
 
 
 
 
IfThenElse
Guest
Posts: n/a
 
      27th Sep 2007
Not necessary, some worker processes might be set to recycle, or recycling
for lack of resources or failures.

Check application pool(s)
check World Wide Web Publishing Service
monitor your resources.


"Joey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> asp.net 2/C#
>
> I have noticed that during periods of inactivity on my website, the
> Application_Start event is firing about every 40-45 minutes. Is this
> normal? Shouldn't the app start once and remain running until I stop
> it?
>
> JP
>



 
Reply With Quote
 
IfThenElse
Guest
Posts: n/a
 
      27th Sep 2007
Check you event logs

"IfThenElse" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Not necessary, some worker processes might be set to recycle, or
> recycling for lack of resources or failures.
>
> Check application pool(s)
> check World Wide Web Publishing Service
> monitor your resources.
>
>
> "Joey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> asp.net 2/C#
>>
>> I have noticed that during periods of inactivity on my website, the
>> Application_Start event is firing about every 40-45 minutes. Is this
>> normal? Shouldn't the app start once and remain running until I stop
>> it?
>>
>> JP
>>

>
>



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      27th Sep 2007
"Joey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> I have noticed that during periods of inactivity on my website, the
> Application_Start event is firing about every 40-45 minutes. Is this
> normal? Shouldn't the app start once and remain running until I stop
> it?


You don't start or stop the Application in this sense...

Application_Start fires when the first Session is created and
Application_End fires when the last Session ends.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
IfThenElse
Guest
Posts: n/a
 
      27th Sep 2007
Mark,

Please define first Session and last Session

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Joey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> I have noticed that during periods of inactivity on my website, the
>> Application_Start event is firing about every 40-45 minutes. Is this
>> normal? Shouldn't the app start once and remain running until I stop
>> it?

>
> You don't start or stop the Application in this sense...
>
> Application_Start fires when the first Session is created and
> Application_End fires when the last Session ends.
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      27th Sep 2007
"IfThenElse" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...

> Please define first Session and last Session


When a client browser first sends a Request to a web application running
under IIS, a Session is created...

If no other Sessions are in existence at that moment, Application_Start
fires.

When a Session dies, if no other Sessions are in existence at that moment,
Application_End fires.

--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
IfThenElse
Guest
Posts: n/a
 
      27th Sep 2007
Mark,

So Joey's situation is normal then.

Thanks


"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "IfThenElse" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>
>> Please define first Session and last Session

>
> When a client browser first sends a Request to a web application running
> under IIS, a Session is created...
>
> If no other Sessions are in existence at that moment, Application_Start
> fires.
>
> When a Session dies, if no other Sessions are in existence at that moment,
> Application_End fires.
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      27th Sep 2007
"IfThenElse" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...

> So Joey's situation is normal then.


Completely.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      27th Sep 2007
I believe Application_Start fires even when Session State is disabled. It
fires in response to the first request coming in, not due to "Session".
Also, if an application recycles on its own either due to memory pressure or
IIS settings, Application_End will fire and Application_Start will fire again
when the new appdomain comes up. That behavior would be independent of any
requests.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com



"Mark Rae [MVP]" wrote:

> "IfThenElse" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>
> > So Joey's situation is normal then.

>
> Completely.
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>
>

 
Reply With Quote
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      27th Sep 2007
Joey wrote:
> asp.net 2/C#
>
> I have noticed that during periods of inactivity on my website, the
> Application_Start event is firing about every 40-45 minutes. Is this
> normal? Shouldn't the app start once and remain running until I stop
> it?
>
> JP
>


It's normal. The web server may stop web applications that aren't active
to preserve resources. The application starts again whenever someone
requests anything from it.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How are Application_Start, etc., called? Harlan Messinger Microsoft ASP .NET 6 4th Aug 2006 03:38 PM
Application_Start exceptions =?Utf-8?B?TGVzbGll?= Microsoft ASP .NET 6 15th Jul 2005 01:49 AM
Application_start stephen noronha Microsoft ASP .NET 1 25th Jun 2004 04:48 AM
application_start stephen noronha Microsoft Dot NET Framework 1 24th Jun 2004 08:56 PM
Application_Start() RB Microsoft ASP .NET 2 13th Feb 2004 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 PM.