By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Keep IIS Alive

P: n/a
I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?

Jun 12 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.

If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.

If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================
<ma********@fificorp.netwrote in message
news:11**********************@r19g2000prf.googlegr oups.com...
>I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?

Jun 12 '07 #2

P: n/a
On 12 Juni, 16:59, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.

If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.

If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message

news:11**********************@r19g2000prf.googlegr oups.com...
I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?- Dölj citerad text -

- Visa citerad text -

Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.

I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.

Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.

Jun 13 '07 #3

P: n/a
re:
!if I succeed to keep the application alive I would not mind
!recycling the application pool at night

You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.

re:
!I have discovered that when Application_End occurs the workflow stops too

That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.

re:
!I have tried to manually load a page from the web site and then the workflow starts up again.

You can setup a batch file which does that, which you can schedule at your lowest-traffic time.

That batch file could include :

1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again

Windows Scheduler can do that quite easily.

In the morning, all you'd have to do is close the server's browser
....or you could kill iexplore.exe's process programmatically ( using another scheduled process ).


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================
<ma********@fificorp.netwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
On 12 Juni, 16:59, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.

If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.

If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message

news:11**********************@r19g2000prf.googlegr oups.com...
I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?- Dölj citerad text -

- Visa citerad text -

Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.

I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.

Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.
Jun 13 '07 #4

P: n/a
On 13 Juni, 10:57, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
!if I succeed to keep the application alive I would not mind
!recycling the application pool at night

You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.

re:
!I have discovered that when Application_End occurs the workflow stops too

That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.

re:
!I have tried to manually load a page from the web site and then the workflow starts up again.

You can setup a batch file which does that, which you can schedule at your lowest-traffic time.

That batch file could include :

1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again

Windows Scheduler can do that quite easily.

In the morning, all you'd have to do is close the server's browser
...or you could kill iexplore.exe's process programmatically ( using another scheduled process ).

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message

news:11**********************@i13g2000prf.googlegr oups.com...
On 12 Juni, 16:59, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:


You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.
If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.
If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message
news:11**********************@r19g2000prf.googlegr oups.com...
>I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?- Dölj citerad text -
- Visa citerad text -

Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.

I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.

Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.- Dölj citerad text -

- Visa citerad text -
It is important that this site does not affect other sites on the web
server so I can not for example execute iisreset at a regular
interval. Yes I can create a batch file or a Windows service that
retrieves a web page from the site at for example every 5 minutes.
However I was hoping for a better solution.

Jun 13 '07 #5

P: n/a
re:
!It is important that this site does not affect other sites on the web
!server so I can not for example execute iisreset at a regular interval.

Place the app in its own Application Pool...and only recycle *that* Application Pool.

A simple procedure to do that is described here:
http://blogs.iis.net/chrisad/archive...n-IIS-6.0.aspx

Another way to do that is described here :
http://www.microsoft.com/technet/tec...1/InsideMSCOM/

( recycleapps.vbs <server_name<apppool_name )

Recycleapps.vbs is included in this download :
http://download.microsoft.com/downlo...nsideMSCOM.exe

If you're not using IIS 6.0, you can open the application's web.config in Notepad,
and use SendKeys to send an <enterand save the file afterwards...or you can
run an ASP.NET file which does that programmatically, using the

You can schedule *that*, too.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================
<ma********@fificorp.netwrote in message
news:11*********************@j4g2000prf.googlegrou ps.com...
On 13 Juni, 10:57, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
!if I succeed to keep the application alive I would not mind
!recycling the application pool at night

You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.

re:
!I have discovered that when Application_End occurs the workflow stops too

That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.

re:
!I have tried to manually load a page from the web site and then the workflow starts up again.

You can setup a batch file which does that, which you can schedule at your lowest-traffic time.

That batch file could include :

1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again

Windows Scheduler can do that quite easily.

In the morning, all you'd have to do is close the server's browser
...or you could kill iexplore.exe's process programmatically ( using another scheduled process ).

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message

news:11**********************@i13g2000prf.googlegr oups.com...
On 12 Juni, 16:59, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:


You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.
If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.
If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================
<mail747...@fificorp.netwrote in message
>
news:11**********************@r19g2000prf.googlegr oups.com...
>I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?- Dölj citerad text -
- Visa citerad text -

Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.

I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.

Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.- Dölj citerad text -

- Visa citerad text -
It is important that this site does not affect other sites on the web
server so I can not for example execute iisreset at a regular
interval. Yes I can create a batch file or a Windows service that
retrieves a web page from the site at for example every 5 minutes.
However I was hoping for a better solution.
Jun 13 '07 #6

P: n/a
On 13 Juni, 13:50, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
!It is important that this site does not affect other sites on the web
!server so I can not for example execute iisreset at a regular interval.

Place the app in its own Application Pool...and only recycle *that* Application Pool.

A simple procedure to do that is described here:http://blogs.iis.net/chrisad/archive...ng-Application...

Another way to do that is described here :http://www.microsoft.com/technet/tec...1/InsideMSCOM/

( recycleapps.vbs <server_name<apppool_name )

Recycleapps.vbs is included in this download :http://download.microsoft.com/downlo...8a1-4f71-8546-...

If you're not using IIS 6.0, you can open the application's web.config inNotepad,
and use SendKeys to send an <enterand save the file afterwards...or youcan
run an ASP.NET file which does that programmatically, using the

You can schedule *that*, too.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message

news:11*********************@j4g2000prf.googlegrou ps.com...
On 13 Juni, 10:57, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:


re:
!if I succeed to keep the application alive I would not mind
!recycling the application pool at night
You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.
re:
!I have discovered that when Application_End occurs the workflow stops too
That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.
re:
!I have tried to manually load a page from the web site and then the workflow starts up again.
You can setup a batch file which does that, which you can schedule at your lowest-traffic time.
That batch file could include :
1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again
Windows Scheduler can do that quite easily.
In the morning, all you'd have to do is close the server's browser
...or you could kill iexplore.exe's process programmatically ( using another scheduled process ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
On 12 Juni, 16:59, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.
If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond torequests, and you
might even see a total failure of the server.
If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================
<mail747...@fificorp.netwrote in message
>news:11**********************@r19g2000prf.googleg roups.com...
I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?- Dölj citerad text -
- Visa citerad text -
Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.
I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.
Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.- Dölj citerad text -
- Visa citerad text -

It is important that this site does not affect other sites on the web
server so I can not for example execute iisreset at a regular
interval. Yes I can create a batch file or a Windows service that
retrieves a web page from the site at for example every 5 minutes.
However I was hoping for a better solution.- Dölj citerad text -

- Visa citerad text -
Thanks for your answer but my problem is that I want to keep the
ASP.NET application alive so the workflow does not stop running if the
web service does not get any requests. Do you think that recycling the
application pool will accomplish that? I am not so sure either that
recycling the application pool every 5 minutes is such a good idea. It
could affect the workflow.

Jun 13 '07 #7

P: n/a
re:
!but my problem is that I want to keep the ASP.NET application alive so the
!workflow does not stop running if the web service does not get any requests.

....and I already told you that might create more problems than it solves.

I have given you pointers to several solutions which *do* work,
with a minimum of fuss and problems for you and/or your application.

If you don't want to implement any of them...you're on your own.

re:
!I am not so sure either that recycling the application pool every 5 minutes is such a good idea.

You have completely misunderstood what the suggested solutions do.

The idea is to recycle the application pool ONCE daily, at the time when your application gets
the least requests, and immediately afterwards run a batch file to reinitialize your workflow.

That will accomplish two things : 1. safeguard your app from being stalled by excessive
resource consumtion ( from not being recycled ) ...and 2. : restart your application
so the workflow gets reinitialized.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espańol : http://asp.net.do/foros/
======================================
<ma********@fificorp.netwrote in message
news:11**********************@q19g2000prn.googlegr oups.com...
On 13 Juni, 13:50, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
re:
!It is important that this site does not affect other sites on the web
!server so I can not for example execute iisreset at a regular interval.

Place the app in its own Application Pool...and only recycle *that* Application Pool.

A simple procedure to do that is described
here:http://blogs.iis.net/chrisad/archive...ng-Application...

Another way to do that is described here
:http://www.microsoft.com/technet/tec...1/InsideMSCOM/

( recycleapps.vbs <server_name<apppool_name )

Recycleapps.vbs is included in this download
:http://download.microsoft.com/downlo...8a1-4f71-8546-...

If you're not using IIS 6.0, you can open the application's web.config in Notepad,
and use SendKeys to send an <enterand save the file afterwards...or you can
run an ASP.NET file which does that programmatically, using the

You can schedule *that*, too.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message

news:11*********************@j4g2000prf.googlegrou ps.com...
On 13 Juni, 10:57, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:


re:
!if I succeed to keep the application alive I would not mind
!recycling the application pool at night
You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.
re:
!I have discovered that when Application_End occurs the workflow stops too
That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.
re:
!I have tried to manually load a page from the web site and then the workflow starts up again.
You can setup a batch file which does that, which you can schedule at your lowest-traffic time.
That batch file could include :
1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again
Windows Scheduler can do that quite easily.
In the morning, all you'd have to do is close the server's browser
...or you could kill iexplore.exe's process programmatically ( using another scheduled
process ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================<mail747...@ fificorp.netwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
On 12 Juni, 16:59, "Juan T. Llibre" <nomailrepl...@nowhere.comwrote:
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.
If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.
If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espańol :http://asp.net.do/foros/
======================================
<mail747...@fificorp.netwrote in message
>news:11**********************@r19g2000prf.googleg roups.com...
I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?- Dölj citerad text -
- Visa citerad text -
Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.
I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.
Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.- Dölj citerad text -
- Visa citerad text -

It is important that this site does not affect other sites on the web
server so I can not for example execute iisreset at a regular
interval. Yes I can create a batch file or a Windows service that
retrieves a web page from the site at for example every 5 minutes.
However I was hoping for a better solution.- Dölj citerad text -

- Visa citerad text -
Thanks for your answer but my problem is that I want to keep the
ASP.NET application alive so the workflow does not stop running if the
web service does not get any requests. Do you think that recycling the
application pool will accomplish that? I am not so sure either that
recycling the application pool every 5 minutes is such a good idea. It
could affect the workflow.
Jun 13 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.