使用Windows服务 [英] working with windows services

查看:93
本文介绍了使用Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b



我正在开发基于客户端服务器的应用程序。客户端和服务器使用TCP / IP套接字相互通信。好吧,这一切都没问题,我想要的是我的服务器端应用程序将在注销模式下运行,这意味着我必须使其成为Windows服务,对于用户我必须在桌面窗口中显示所有客户端列表。所以我的问题是服务和Deskop窗口表单应用程序将如何相互通信。



提前感谢您的时间和响应。

Hi

I am developing a client server based application. Client and server communicate with each other using TCP/IP sockets. Well that is all ok, what i want is that my Server side application will be running in log off mode, that means i have to make it a Windows Service and for the user I have to show all the client list in a desktop windows Form. so my Question is how the service and the Deskop window Form application will communicate with each other.

thanks in advance for your time and response.

推荐答案

从这里开始:

用C#创建基本的Windows服务 [ ^ ]

http://www.c-sharpcorner.com/UploadFile/mahesh/window_service11262005045007AM/window_service.aspx [ ^ ]

http://msdn.microsoft.com/en- us / library / zt39148a(v = vs.80).aspx [ ^ ]

如果您的服务器作为普通应用程序正常工作,它也可能作为服务工作。请注意,该服务在特殊用户上下文中运行(当然可以更改),因此请务必对服务器服务将使用的资源设置适当的访问权限。
Start here:
Creating a Basic Windows Service in C#[^]
http://www.c-sharpcorner.com/UploadFile/mahesh/window_service11262005045007AM/window_service.aspx[^]
http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.80).aspx[^]
If your server is working correctly as normal application it will probably work as service as well. Just note, that the service is running under special user context (that can be changed of course), so be careful to set proper access rights on resources that the server service will use.


这篇关于使用Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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