简体   繁体   English

在IIS上运行Windows服务

[英]Run a Windows Service on IIS

I want to run a service, like Windows Service that will run every hour on IIS. 我想运行一项服务,例如Windows Service,它将每小时在IIS上运行一次。 I do not want to use the service locally on my machine as it would dependent on the machine being keep on for the service to work. 我不想在我的机器上本地使用该服务,因为它取决于机器保持该服务正常工作。 Is there a way to achieve this? 有没有办法做到这一点? I have tried to find a solution but could not find a clear answer. 我试图找到一种解决方案,但找不到明确的答案。

A windows service and an IIS application are different. Windows服务和IIS应用程序不同。 It sounds like you want to run a recurring task for your website, for that I would recommend something like hangfire or quartz.net . 这听起来像你想运行定期任务为您的网站,因为这我会建议像迟发型quartz.net Both offer persistence options so that they can run even if the application is restarted or recycled. 两者都提供了持久性选项,因此即使重新启动或回收应用程序,它们也可以运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM