在Web应用程序中的周期性任务子系统 [英] A subsystem within web application for periodic tasks

查看:101
本文介绍了在Web应用程序中的周期性任务子系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要为precise:我有一个.NET Web表单系统。我需要一种方法来检查的一些价值观和执行任务,这取决于周期性的方式处理这些值。比方说:我每个月要检查,如果我的客户的信用卡仍然有效。还有一些其他的任务/检查时间很短。

To be precise: I have a .NET web forms system. I need a way to check some values and perform tasks, depending on these values in periodic manner. Let's say: Every month I have to check if my customers credit cards are still valid. There some other tasks/checking in short periods.

什么是这个问题的最好的办法。我想到了Windows服务,但我了解WCF。请指教一下是现代和良好的方法来解决这个任务。我在想.NET 4.0。

What is the best approach to the subject. I thought about Windows Service but I read about WCF. Please advise what is the modern and good way to solve this task. I'm thinking about .NET 4.0.

推荐答案

WCF就是能够在任何Windows服务或IIS中运行的接口。您可以使用此WCF接口来引发一些同步或异步操作。

WCF is just an interface that can run in either Windows Service or IIS. You use this WCF interface to trigger some synchronous or asynchronous actions.

您的情况听起来好像你在计时器希望Windows服务来存储在数据库或文件中的数据进行验证。

Your case sounds like you want a Windows Service on timer to perform validation on data stored in a data base or file.

如果你想按需启动一个进程,然后添加一个WCF终结可能是有用的,如果定时器的做法是不够好,那么你不必费心与WCF。

If you want to start a process on demand then adding a WCF endpoint might be useful, if the timer approach is good enough, then you need not bother with WCF.

在Windows进程托管WCF引用

References for hosting WCF in Windows Process

  • microsoft.com
  • codeproject.com

这篇关于在Web应用程序中的周期性任务子系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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