472,331 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,331 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 2487
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...
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...
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...
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...
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...
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...
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...
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...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.