如何将WCF转换为Windows服务 [英] How to convert WCF to Windows Service

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

问题描述

嗨盖伊兹,

是否可以将WCF转换为Windows服务?

就像在webconfig中一样?


谢谢,

Hi Guyz,

is it possible to convert WCF to windows service?

something like in webconfig?


thanks,

推荐答案

否.这个问题本身毫无意义. WCF和Windows服务不是不同的选项.您可以将WCF与Windows Service一起使用,不使用WCF,是否可以在Windows Service中使用自托管WCF,也可以不使用WCF,使用套接字,经典远程处理,命名管道或任何其他用于通信的Windows Service.

这两个概念无关. Windows服务是一种由服务主机托管并以非交互模式运行的应用程序;这样,它就可以在用户登录和注销时或在没有人登录时保持运行.WCF很好……一个基金会,Windows Communication Foundation,一个框架和API,可以在任何类型的应用程序中使用,没有任何例外. >
在问这样的问题之前,您至少必须阅读一点.参见:

http://en.wikipedia.org/wiki/Windows_Service [ http://msdn.microsoft.com/en-us/library/d56de412%28v = VS.100%29.aspx [ ^ ],

http://en.wikipedia.org/wiki/Windows_Communication_Foundation [ http://msdn.microsoft.com/en-us/library/ms731082.aspx [ ^ ],
http://msdn.microsoft.com/en-us/netframework/aa663324 [ ^ ].



这是有关如何自托管WCF的分步建议: http://msdn.microsoft .com/en-us/library/ms731758.aspx [ ^ ].

如果您还需要其他内容,则必须进行解释.如果您没有任何特殊要求,我建议您自托管.

—SA
No. The question itself makes no sense at all. WCF and Windows Service are not different options. You can use WCF with Windows Service and without it, self-host WCF in Windows Service or not, you can also use Windows Service without WCF, using sockets, classical remoting, named pipes or anything else for communications.

These two concepts are not related. Windows Service is a type of application which is hosted by the service host and runs in non-interactive mode; in this way, it keeps running when users log in and out or in nobody logs in. WCF is well… a Foundation, Windows Communication Foundation, a Framework and API which can be used in any type of applications, no exclusions.

You have to read at least just a bit before asking such questions. See:

http://en.wikipedia.org/wiki/Windows_Service[^],
http://msdn.microsoft.com/en-us/library/d56de412%28v=VS.100%29.aspx[^],

http://en.wikipedia.org/wiki/Windows_Communication_Foundation[^],
http://msdn.microsoft.com/en-us/library/ms731082.aspx[^],
http://msdn.microsoft.com/en-us/netframework/aa663324[^].



Here is a step-by-step advice of how to self-host WCF: http://msdn.microsoft.com/en-us/library/ms731758.aspx[^].

If you need something else, you have to explain it. If you don''t have any special requirements, I would recommend to self-host.

—SA


看看下面的链接"在Windows服务中托管WCF ".

http://msdn.microsoft.com/en-us/library/ms733069.aspx

http://social.msdn.microsoft.com /Forums/zh-CN/wcf/thread/9fdf32a4-91d3-4f5d-8962-e0bc2d51c61e/

带有Windows服务托管的WCF服务库

看看这个的Google搜索结果.
Have a look at below links for "Hosting WCF in Windows Services".

http://msdn.microsoft.com/en-us/library/ms733069.aspx

http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9fdf32a4-91d3-4f5d-8962-e0bc2d51c61e/

WCF Service Library with Windows Service Hosting

Have a look at Google Search Result for this.
Google Search Result


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

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