之前在博客几个实例DemoWCF服务寄宿到控制到应用程序中,这篇来总结一下,经常使用的几种宿主的方式。

1.Self-Hosting

一个WCF服务可以寄宿在控制台应用程序或者WinForms application中。

1.1.长处

A.很easy的建立。把须要的配置都写在配置文件里。代码写的很少

B.很easy去调试,不用附加进程

C.支持全部的Bindings和传输协议

D.很灵活的去控制服务的生命周期通过打开和关闭方法去控制

1.2.缺点

A.仅仅有当服务宿主执行时,WCF服务才干够供client调用

B.须要自己定义代码

 2. Windows Service

一个windows service与其它的程序或者应用很的相似,仅仅只是windows service执行在后台,而且可以随着系统的启动而自己主动的启动。Windows Service不须要接口。

2.1.长处

A.一个Windows Service可以随着系统的执行自己主动的启动

B.一个Windows Service可以自己主动的重新启动或者当发生失败时可以自己主动的恢复

C.支持全部的Bindings和传输协议

2.2.缺点

A.须要自己定义代码去创建一个Windows Services

B.Wcf宿主须要部署在server上

C.在调试的时候,我们须要附加到进程里面

  3.IIS

直接把WCF服务寄宿到IIS中。

3.1.长处

A.不须要代码去寄宿WCF 服务。在IIS中,服务宿主直接在.SVC文件里。通过这个文件就能够实例化一个WCF服务。

B.自己主动传输信息,甚至当服务改变时,IIS自己主动发生改变,client不用终止。

3.2.缺点

A.于IIS5.1和6.0于,IIS只有执行HTTP合约

版权声明:本文博主原创文章,博客,未经同意不得转载。

Hosting WCF Service的更多相关文章

  1. WCF - Hosting WCF Service

    After creating a WCF service, the next step is to host it so that the client applications can consum ...

  2. WCF - Hosting WCF Service 四种托管方式

    https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm After creating a WCF service, the next st ...

  3. Learning WCF Chapter1 Hosting a Service in IIS

    How messages reach a service endpoint is a matter of protocols and hosting. IIS can host services ov ...

  4. Hosting Multiple Service Implementations On The Same Port With WCF

    Hosting Multiple Service Implementations On The Same Port With WCF Recently I have been playing arou ...

  5. Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7

    http://sandrinodimattia.net/fixing-common-issues-when-hosting-a-net-4-0-wcf-service-in-iis-7/ Until ...

  6. Deploying an Internet Information Services-Hosted WCF Service

    Deploying an Internet Information Services-Hosted WCF Service .NET Framework 4   Other Versions .NET ...

  7. WCF - Consuming WCF Service

    WCF services allow other applications to access or consume them. A WCF service can be consumed by ma ...

  8. WCF Service Configuration Editor的使用

    原文:http://www.cnblogs.com/Ming8006/p/3772221.html 通过WCF Service Configuration Editor的配置修改Client端 参考 ...

  9. 探讨 : Host在IIS上的WCF Service的执行方式

    一个WCF请求由两个线程来完成 运行在IIS上的WCF service, 你可能会注意到一个比较有趣的现象. 当WCF service接收到一个请求时, 这个请求实际上会有两个线程在执行这个请求. 一 ...

随机推荐

  1. SecureCRT 连接虚拟机Linux

    SecureCRT 连接虚拟机Linux   最近在学习linux,在学习中遇到了一些问题,现总结一下. 虚拟机我用的是VirtualBox,完美支持中文,可以在电脑中创建虚拟机环境,上手非常简单.具 ...

  2. Merging a WPF application into a single EXE(WPF应用程序合并成单个Exe文件)

    I always dislike handing off little applications to people. Not because I can’t, but because of the ...

  3. C语言 - 结构体(struct)比特字段(:) 详细解释

    结构体(struct)比特字段(:) 详细解释 本文地址: http://blog.csdn.net/caroline_wendy/article/details/26722511 结构体(struc ...

  4. hdu 1251 统计难题 (map水过)

    # include <stdio.h> # include <algorithm> # include <string> # include <map> ...

  5. Struts2第一个工程helloStruts极其基本配置

    前面已经准备好了Struts-2.3.15,现在就可以直接搭建Struts2的工程了.前面http://blog.csdn.net/huangchnegdada/article/details/917 ...

  6. HDU 3830 Checkers

    意甲冠军: 有三件  所有其他棋子可以跳  不能分开的两个跳跃  当被问及状态u为了国家v最低短跳转 思路: 对于一个状态三个棋子的位置能够设为 x y z  (小到大) 仅仅有当y-x=z-y的时候 ...

  7. cocos2dx 3.1从零学习(六)——CocosStudio(VS2013project导入及环境设置)

    导入libCocosStudio.libExtensions.libGUI 新建的project例如以下图: 加入现有项目 右键解决方式.例如以下操作: watermark/2/text/aHR0cD ...

  8. JavaMail学习笔记(七)、帐号激活与忘记密码 实例(zhuan)

    一.帐户激活   在很多时候,在某些网站注册一个用户之后,网站会给这个用户注册时填写的email地址发送一封帐户激活邮件,这封邮件的内容就是一个激活帐户的链接和一段简短的文字描述,如果用户没有去邮箱将 ...

  9. WIFI实时监控追踪小车演示视频——安卓端、小车

    文章由@超人爱因斯坦出品,转载请注明出处.         文章链接:          http://hpw123.net/a/qingsongyike/yingyinqu/2014/1019/59 ...

  10. 从零开始学Xamarin.Forms(一) 概述

    原文:从零开始学Xamarin.Forms(一) 概述     Xamarin 读 "ˈzæmərin",是一个基于开源项目mono的能够使用C#开发的收费的跨平台(iOS.And ...