473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

I dont want that application stop

Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in Application_Stop
events. I log this events. I see that when all sessions time out, Application
stops. How can prevent application stop?
--
______________________________
Åženol Akbulak
Nov 19 '05 #1
13 2569
A (likely bad) way would be to trigger a request on a page of this app on a
regular bais so that you always have someone connected...

Actually it looks like you would need to create a Windows service rather
than a web application. Why should this application always run ?

Patrice
--

"Senol Akbulak" <se**********@newsgroup.nospam> a écrit dans le message de
news:84**********************************@microsof t.com...
Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in Application_Stop events. I log this events. I see that when all sessions time out, Application stops. How can prevent application stop?
--
______________________________
Senol Akbulak

Nov 19 '05 #2
> Why should this application always run ?
Because it checks some states and if needed it sends email. It must check
every minute.
Actually it looks like you would need to create a Windows service rather
than a web application. Because manage and maintenance easier than windows service.
A (likely bad) way would be to trigger a request on a page of this app on a
regular bais so that you always have someone connected... Is not there any likely solution?

"Patrice" wrote:
A (likely bad) way would be to trigger a request on a page of this app on a
regular bais so that you always have someone connected...

Actually it looks like you would need to create a Windows service rather
than a web application. Why should this application always run ?

Patrice
--

"Senol Akbulak" <se**********@newsgroup.nospam> a écrit dans le message de
news:84**********************************@microsof t.com...
Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in

Application_Stop
events. I log this events. I see that when all sessions time out,

Application
stops. How can prevent application stop?
--
______________________________
Senol Akbulak


Nov 19 '05 #3
If you don't want to create a Windows service (AFAIK .NET allows to do that
quite easily) it could be just a regular application that is :
- either scheduled to be lauched every minute
- or is launched one time and wake up itself every minute

I'm not aware of such a settings but perhaps a web.config, machine.config or
IIS setting would allow to keep the web application in memory forever.
The last resort I see would be to issue this HTTP request to itself when
waking up allowing to have the application using itself allowing to keep
running forever...

It could also be triggered by the original source event (for example if this
is caused by data written in a SQL DB, a trigger could then laucn immediatly
the appropriate processing when a new row is added in the table).
Patrice
--

"Senol Akbulak" <se**********@newsgroup.nospam> a écrit dans le message de
news:B9**********************************@microsof t.com...
Why should this application always run ?

Because it checks some states and if needed it sends email. It must check
every minute.
Actually it looks like you would need to create a Windows service rather
than a web application.

Because manage and maintenance easier than windows service.
A (likely bad) way would be to trigger a request on a page of this app on a regular bais so that you always have someone connected...

Is not there any likely solution?

"Patrice" wrote:
A (likely bad) way would be to trigger a request on a page of this app on a regular bais so that you always have someone connected...

Actually it looks like you would need to create a Windows service rather
than a web application. Why should this application always run ?

Patrice
--

"Senol Akbulak" <se**********@newsgroup.nospam> a écrit dans le message de news:84**********************************@microsof t.com...
Hi,

I have an asp.net application. And I have worker threads which must run always (7x24).

I start my threads in Application_Start, and I stop its in

Application_Stop
events. I log this events. I see that when all sessions time out,

Application
stops. How can prevent application stop?
--
______________________________
Senol Akbulak


Nov 19 '05 #4
A long time ago I tried to get an answer to this very same question. It is a
web application that caches many things, so whenever it has to start up from
scratch, it has a few-second delay. This degrades the user experience for
the "first" user who hits the web app after it has been stopped by IIS/.NET.

Unless something has changed in the last year, the only solutions I ever
found were by creating a function within the Global.asax with a timer that
would browser to a self-contained page (that effectively did nothing), except
simply by "hitting" it would keep a session alive, and thus not allow the
application to end.

I don't have an example because I was not able to get it to work.

I will be curious to see if you find a real working solution to this.
Nov 19 '05 #5
Senol Akbulak wrote:
Hi,

I have an asp.net application. And I have worker threads which must run always (7x24).

I start my threads in Application_Start, and I stop its in Application_Stop events. I log this events. I see that when all sessions time out, Application stops. How can prevent application stop?


What if you don't stop it in Application_Stop? An ASP.NET webapp is
really stopped only when its application domain is unloaded. Your
worker threads should be able to continue even after the
HttpApplication is stopped.

Nov 19 '05 #6
If this is Windows Server 2003, then you can change the "Shutdown
worker process after being idle" time in minutes (or disable the
setting). Go to the IIS MMC -> Computer -> Application Pools and right
click on the pool for your app. The setting is on the performance tab.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 7 Apr 2005 01:19:06 -0700, "?enol Akbulak"
<se**********@newsgroup.nospam> wrote:
Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in Application_Stop
events. I log this events. I see that when all sessions time out, Application
stops. How can prevent application stop?


Nov 19 '05 #7
ASP.NET is not a very good fit for your requirements.
Instead, a Windows Service is the most reliable tool for this job.

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

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Senol Akbulak" <se**********@newsgroup.nospam> wrote in message
news:84**********************************@microsof t.com...
Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in
Application_Stop
events. I log this events. I see that when all sessions time out,
Application
stops. How can prevent application stop?
--
______________________________
Senol Akbulak

Nov 19 '05 #8
If you REALLY don't want to write a windows service (and you really should
for this task), why not just a console app with a timer? Far less overhead
then running it in ASP.NET.

-Steven
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:OH*************@TK2MSFTNGP15.phx.gbl...
ASP.NET is not a very good fit for your requirements.
Instead, a Windows Service is the most reliable tool for this job.

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

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Senol Akbulak" <se**********@newsgroup.nospam> wrote in message
news:84**********************************@microsof t.com...
Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in
Application_Stop
events. I log this events. I see that when all sessions time out,
Application
stops. How can prevent application stop?
--
______________________________
Senol Akbulak


Nov 19 '05 #9
Hi Senol,

Have you found a proper solution for this issue? How about Scott's suggest
on using the
"shut down worker process after being idle for ..." setting in the
IIS6(WIN2K3) 's application pool setting's performance tab? When unchecking
that option, we can make the process of that application pool always exist
in memory, not be shutdown after being idle.

In addition , as for the
==================
A (likely bad) way would be to trigger a request on a page of this app on a regular bais so that you always have someone connected...

==================

I don't think this is a good approach. So if possible, I suggest you
consider the above setting or the Windows service solution other members
have mentioned.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #10
Thank you for your interest.

I am trying Application Pool settings now. I will return when I finish test.
"Steven Cheng[MSFT]" wrote:
Hi Senol,

Have you found a proper solution for this issue? How about Scott's suggest
on using the
"shut down worker process after being idle for ..." setting in the
IIS6(WIN2K3) 's application pool setting's performance tab? When unchecking
that option, we can make the process of that application pool always exist
in memory, not be shutdown after being idle.

In addition , as for the
==================
A (likely bad) way would be to trigger a request on a page of this app

on a
regular bais so that you always have someone connected...

==================

I don't think this is a good approach. So if possible, I suggest you
consider the above setting or the Windows service solution other members
have mentioned.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #11
OK. Good luck ! :-)

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #12
Thank you Scott;

I tried your solution and it runs always.

"Scott Allen" wrote:
If this is Windows Server 2003, then you can change the "Shutdown
worker process after being idle" time in minutes (or disable the
setting). Go to the IIS MMC -> Computer -> Application Pools and right
click on the pool for your app. The setting is on the performance tab.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 7 Apr 2005 01:19:06 -0700, "?enol Akbulak"
<se**********@newsgroup.nospam> wrote:
Hi,

I have an asp.net application. And I have worker threads which must run
always (7x24).

I start my threads in Application_Start, and I stop its in Application_Stop
events. I log this events. I see that when all sessions time out, Application
stops. How can prevent application stop?


Nov 19 '05 #13
You are quite welcome, and I'm glad to be of help somewhere.

--
Scott
http:// mud

On Mon, 11 Apr 2005 23:22:02 -0700, "?enol Akbulak"
<se**********@newsgroup.nospam> wrote:
Thank you Scott;

I tried your solution and it runs always.

Nov 19 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Google Mike | last post by:
I need an Application object replacement. I was creating my own using shared memory -- shm* API in PHP. I was doing fine for 6 months until it just got too fat, I guess, and the RH9 Linux server...
0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
11
by: BerkshireGuy | last post by:
Hello, I need to create an interactive report that can be sent to agencies with the following: Application #, Date Approved, Reason Not Taken The reason not take should be a drop down in...
5
by: pcad1 | last post by:
I'm developing a C# application that I want to run on standalone computers, but not from a server or network. Is there a way on starting the application that I can check if the application is on a...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
2
by: tshad | last post by:
I have my Application variables getting set in my Global.aspx file. If I change a variable in my table that is read at startup, I need to restart the application to reload the variables. I...
6
by: M Craig | last post by:
I'm trying to write a custom installation engine to plug into our existing build system. Some things I'm trying to do are, Create/Delete/Start/Stop Application Pools, Web Sites, and Virtual...
5
by: =?Utf-8?B?U2Ftc3VkZWVu?= | last post by:
There is an application "abc.exe" which i dont have control of. i need to monitor this application and prevent it from starting & doing any functionality. Killing it, when it try to startup is fine...
7
by: PetterL | last post by:
I have a setting called My.settings.firstrun set to True, set in the setting manager. When i read this in the first form form_Load in a IF sentence it always come out as false. I have tried to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.