导航

2013年8月28日

摘要: 使用Topshelf创建Windows 服务简要的介绍了创建Windows服务的另一种方法,老外的一篇文章Create a .NET Windows Service in 5 steps with Topshelf通过5个步骤详细的介绍使用使用Topshelf创建Windows 服务。Topshelf是一个开源的跨平台的宿主服务框架,支持Windows和Mono,只需要几行代码就可以构建一个很方便使用的服务宿主。1、Topshelf的代码托管在http://topshelf-project.com/,可以在这里下载到最新的代码。2、使用Visual Studio创建一个控制台应用程序引用程序集 阅读全文

posted @ 2013-08-28 00:05 毅无涯 阅读(277) 评论(0) 推荐(0) 编辑

摘要: Winndows Service 是一种可随 Windows 操作系统启动而启动的,在后台运行的,通常不和用户产生交互的程序。它无法通过双击来运行,类似于 Unix 守护进程(daemon processes),当用户注销时它也不会停止。Windows 服务由三部分组成:一个服务可执行文件;一个服务控制程序(SCP);服务控制管理器(SCM),负责在 HKLM"SYSTEM"CurrentControlSet"Services 下创建服务键值。用户可通过 SCP 控制服务的启动、停止、暂停等,SCP 会通过 SCM 调用服务程序开发一个Windows服务通常也比较 阅读全文

posted @ 2013-08-28 00:03 毅无涯 阅读(310) 评论(0) 推荐(0) 编辑

摘要: Have you got tired of attaching the Visual Studio debugger to theserviceapplication? I got the solution just for you! It’s a small helper class containing astaticmethod which you need to invoke.public static void Main(string[] argv){ // just include this check, "Service1" is the name of yo 阅读全文

posted @ 2013-08-28 00:00 毅无涯 阅读(187) 评论(0) 推荐(0) 编辑