什么是Windows服务?它们与其他.NET应用程序有何不同? [英] What are windows services? How are they differ from other .NET application?

查看:50
本文介绍了什么是Windows服务?它们与其他.NET应用程序有何不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是Windows服务?它们与其他.NET应用程序有何不同?欢迎看到差异的任何参考或示例

解决方案

Windows服务是Windows的概念,除了可以使用.NET语言编写外,通常与.NET本身没有任何关系./p>

服务与普通Windows应用之间的主要区别

  • 服务始终运行(通常在计算机启动时启动;取决于在设计上,您可以手动停止或启动这些程序)
  • 服务没有UI(如果要显示服务中的UI,则需要通过单独的过程),并且大多数情况下不会直接与用户互动
  • 服务在单独的Windows会话(大多数为会话0)中运行,因此(大多数情况下)在计算机的所有用户之间共享
  • 服务可能会提供恢复操作(在第一个,第二个和第二个操作上要做的事情后续失败)
  • 服务很难编写,尤其是调试.因此,如果考虑编写服务,请考虑使用控制台应用程序+排定的任务优先 Windows服务与计划任务

What are windows services? How are they different from other .NET application? Any references or examples are welcome which sight the differences

解决方案

Windows service is a Windows concept and generally does not really have anything to do with .NET per se other than that these could be written in .NET languages.

The main difference between a service and an ordinary windows app

  • Services always run (usually started when computer boots; depending on design, you can manually stop or start these)
  • Services have no UI (If you want to show UI from a service, you need to do it via a separate process) and mostly do not interact directly with users
  • Services run in a separate Windows session (mostly, session 0) and, therefore, are (most always) shared between all users of a computer
  • Services may offer recovery actions (what to do on first, second, and subsequent failures)
  • Services are a bit harder to write and especially to debug. Thus, if thinking of writing a service, please consider console app + scheduled task first windows service vs scheduled task

这篇关于什么是Windows服务?它们与其他.NET应用程序有何不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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