WCF - Hosting WCF Service 四种托管方式

https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm

After creating a WCF service, the next step is to host it so that the client applications can consume it. This is known as WCF service hosting. A WCF service can be hosted by using any of the four ways given below:

在创建wcf服务后,下一个步骤就是托管该服务,确保客户端应用可以使用它。这也被称为wcf服务托管。wcf服务可以使用下面4种中的任一一种方式进行托管

  • IIS Hosting - IIS stands for Internet Information Services. Its working model is similar to that of ASP.NET while hosting a WCF service. The best feature of IIS hosting is that the service activation is processed automatically. IIS hosting also offers process health monitoring, idle shutdown, process recycling, and many more features to facilitate a WCF service hosting.

  • Self-Hosting - When a WCF service is hosted in a managed application, it is known as self-hosting. It requires a developer to write the requisite coding for ServiceHost initialization. In self-hosting, a WCF service can be hosted in a variety of applications like Console application, Windows form, etc.

  • WAS Hosting - Hosting a WCF service in Windows Activation Service (WAS) is most advantageous because of its features such as process recycling, idle time management, common configuration system, and support for HTTP, TCP, etc.

  • Windows Service Hosting - For local system clients, it is best to host WCF service as a window service and this is known as Window Service Hosting. All the versions of Windows support this type of hosting and here, the Service Control Manager can control the process lifecycle of the WCF service.

    

IIS托管:互联网信息服务,在托管wcf服务的时候,它的工作模式类似于ASP.NET。IIS托管的最好的特性是:服务激活是自动处理的。IIS托管同样提供进程安全监视,空闲挂断,进程复用,以及许多其他的功能来促进wcf服务托管。

自托管:当一个wcf服务托管在一个托管应用上时,被称为自托管。这就要求开发人员为服务托管初始化编写必要的代码。在自托管中,wcf服务可以托管在许多应用上。比如控制台应用,winform应用等。

WAS托管:将wcf服务托管在windows激活服务上是最有利的,因为它包含如下功能:进程复用,空闲时间管理,公共配置系统,并且支持HTTP和TCP等

windows服务托管:对于本地系统客户端而言,将wcf服务作为windows服务来托管是最好的托管方式。所有版本的windows操作系统都支持这种类型的托管,服务控制管理器可以控制wcf服务的进程的生命周期。

 

第四个Windows Service的解释,在services.msc的Help的Help topics中找到的

A service is an application type that runs in the system background without a user interface and is similar to a UNIX daemon process.

Services provide core operating system features, such as Web serving, event logging, file  serving, printing, cryptography, and error reporting.

 

作者:Chuck Lu    GitHub    
posted @   ChuckLu  阅读(780)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2014-07-08 AcceptAsync和BeginAccept的区别
点击右上角即可分享
微信分享提示