English 中文(简体)
利用Timers在一家自毁的工联服务处开展定期业务
原标题:Periodic operations in a Self-Hosted WCF Service using Timers

我知道,把时间推到设在国际职工会内部的工联服务班,这不是一个好的想法,因为这些班子的寿命很短。 https://stackoverflow.com/questions/1873510/Termic-tasks-inside-wcf-service-hosted-in-iis” 这样做也好像是解决这一问题的最佳途径。

但是,任何人在生产过程中是否尝试过使用假肢的人? 我们有一个窗口服务,作为客户,并使用时间进行经常性业务。

在大多数情况下,这是罚款的,但我对设计的有力性感到关切:有些业务是关键(金融系统计算触发因素)。 由于世界合作框架服务和窗口服务是两个组成部分,确保两者都难以运行。

如果我把关键行动移到世界合作框架服务局的一位时间,我就消除了这一问题,但我应当对此感到关切?

问题回答

If I understand correctly, your question is actually about IIS-hosted WCF services, is that right?

IIS controls the application pool that your WCF service runs in. That means that IIS may decide to recycle your application pool and all the apps/services in it. Then your service only gets activated again once it is called by a client. So, scheduling in WCF services or ASP.NET applications cannot be relied on.

The picture of course changes if you can self-host your WCF service. Then there is no IIS application pooling to take into account, and you can schedule at will. Therefore, if you need the combination of WCF + scheduling, it s best to create a Windows service that will include both.





相关问题
How do I wait for a TTimer to finish?

I have a TFrame (fraDisplay) with a TTimer (timAnimateDataChange). The timer is used to control a small animation. In the form containing the frame I want to have a method that does something like ...

How to tell if an ajax timer has gone off at page_load

I have a web application and I m attempting to put an ajax timer control in it to give me a post back every 10-20 seconds. (possibly longer depending on performance). I have a lot of dynamically ...

Got an error 1120 ~ Access of undefined property

This is not your typical 1120. I know better than to have buttons/MCs without instance names on the timeline. Nope, this problem resides in a I timer I built from script I found online. The undefined ...

what is the right way to call the Timer ElapsedEventHandler

i have a timer that calls its even handler method every 30 seconds. but i want to initialy call this method. the signature of the event handler method is void TimerElapsed_GenerateRunTimes(object ...

Timer for a polling windows service

I wrote a Timer class in order to use it within a windows service that is polling another system. I did this because I had two issues that the System.Timers.Timer is not addressing. The Elapsed ...

Using C# Timer to stop executing a Program

I want a program to stop executing for a certain amount of time. And i want this to happen in regular intervals. For example, i want a program to run for 5 minutes and then it should stop for 2 ...

热门标签