我不希望该应用程序停止 [英] I dont want that application stop

查看:57
本文介绍了我不希望该应用程序停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个asp.net应用程序。我有工作线程必须运行

总是(7x24)。


我在Application_Start中启动我的线程,我在Application_Stop中停止它

活动。我记录这个事件。我看到当所有会话超时时,应用程序

停止。如何阻止申请停止?

-

______________________________

?? enol Akbulak

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

推荐答案

一种(可能很糟糕的)方式是在

常规bais上触发此应用程序页面上的请求,以便您始终有人连接...


实际上,您似乎需要创建一个Windows服务,而不是Web应用程序的b $ b。为什么这个应用程序总是运行?


Patrice

-


Senol Akbulak < SE ********** @ newsgroup.nospam> écritdansle message de

news:84 ********************************* * @ microsof t.com ...
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...


我有一个asp.net应用程序。我有工作线程必须始终运行(7x24)。

我在Application_Start中启动我的线程,并在
Application_Stop事件中停止它。我记录这个事件。我看到当所有会话超时时,
应用程序停止。如何防止申请停止?
-
______________________________
Senol Akbulak
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



>为什么这个应用程序总是运行?

因为它会检查一些状态,如果需要它会发送电子邮件。它必须每分钟检查


> Why should this application always run ?
Because it checks some states and if needed it sends email. It must check
every minute.
实际上,您似乎需要创建一个Windows服务而不是Web应用程序。
因为管理和维护比Windows服务更容易。

A(可能是坏的)方式是在
常规bais上触发此应用程序页面上的请求,以便您总是有人联系...
是否有任何可能的解决方案?


" Patrice"写道:

A(可能是坏的)方式是在
常规bais上触发此应用程序页面上的请求,以便您始终有人连接...

实际上,您似乎需要创建一个Windows服务而不是Web应用程序。为什么这个应用程序总是运行?

Patrice

-

Senol Akbulak < SE ********** @ newsgroup.nospam> a ??? crit dans le message de
新闻:84 ********************************** @ microsof t.com ...
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...


我有一个asp.net应用程序。我有工作线程必须始终运行(7x24)。

我在Application_Start中启动我的线程,然后我在
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


Application_Stop

事件。我记录这个事件。我看到当所有会话超时时,
events. I log this events. I see that when all sessions time out,


Application


Application

停止。如何阻止申请停止?
-
______________________________
Senol Akbulak
stops. How can prevent application stop?
--
______________________________
Senol Akbulak




如果您不想创建Windows服务(AFAIK .NET允许这样做很容易),那么它可能只是一个常规应用程序:

- 计划每分钟推出一次

- 或者每次启动一次并每分钟醒来


我不知道这样的设置但是也许是web.config,machine.config或

IIS设置可以让Web应用程序永远保存在内存中。

我看到的最后一种方法就是发出这个HTTP

醒来时请求自己让应用程序使用自己允许保持

永远运行...


它也可以由原始源事件触发(例如,如果这个
是由SQL DB中写入的数据引起的,那么触发器就可以了n立即

在表格中添加新行时的适当处理。

Patrice

-

" Senol Akbulak" < SE ********** @ newsgroup.nospam> écritdansle message de

新闻:B9 ********************************* * @ microsof t.com ...
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.

实际上,你似乎需要创建一个Windows服务而不是Web应用程序。
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.

一种(可能是坏的)方式是在常规bais上触发此应用程序页面上的请求
所以你总是有人联系......
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...


是否有任何可能的解决方案?

Patrice写道:


Is not there any likely solution?

"Patrice" wrote:

一种(可能是坏的)方式是在常规bais上触发此应用程序
页面上的请求,以便您始终有人连接...

实际上,您似乎需要创建Windows服务,而不是Web应用程序。为什么这个应用程序总是运行?

Patrice

-

Senol Akbulak < SE ********** @ newsgroup.nospam>一个écritdansle message
de news:84 ********************************** @ microsof t .com ...
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...


我有一个asp.net应用程序。我有工作线程,必须
总是运行(7x24)。

我在Application_Start中启动我的线程,我在
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


Application_Stop

事件。我记录这个事件。我看到当所有会话超时时,
events. I log this events. I see that when all sessions time out,


Application


Application

停止。如何阻止申请停止?
-
______________________________
Senol Akbulak
stops. How can prevent application stop?
--
______________________________
Senol Akbulak



这篇关于我不希望该应用程序停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆