Hosting WCF Service
之前在博客几个实例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的更多相关文章
- WCF - Hosting WCF Service
After creating a WCF service, the next step is to host it so that the client applications can consum ...
- WCF - Hosting WCF Service 四种托管方式
https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm After creating a WCF service, the next st ...
- 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 ...
- 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 ...
- 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 ...
- Deploying an Internet Information Services-Hosted WCF Service
Deploying an Internet Information Services-Hosted WCF Service .NET Framework 4 Other Versions .NET ...
- WCF - Consuming WCF Service
WCF services allow other applications to access or consume them. A WCF service can be consumed by ma ...
- WCF Service Configuration Editor的使用
原文:http://www.cnblogs.com/Ming8006/p/3772221.html 通过WCF Service Configuration Editor的配置修改Client端 参考 ...
- 探讨 : Host在IIS上的WCF Service的执行方式
一个WCF请求由两个线程来完成 运行在IIS上的WCF service, 你可能会注意到一个比较有趣的现象. 当WCF service接收到一个请求时, 这个请求实际上会有两个线程在执行这个请求. 一 ...
随机推荐
- Android在ListView显示图片(重复混乱闪烁问题)
Android在ListView显示图片(重复混乱闪烁问题) 1.原因分析 ListView item缓存机制: 为了使得性能更优,ListView会缓存行item(某行相应的View). ListV ...
- libevent book——event | Gaccob的博客
libevent book——event | Gaccob的博客 libevent book——event 发表于 2013 年 2 月 22 日 由 gaccob 原文地址:http://www.w ...
- poj3642 Charm Bracelet(0-1背包)
题目意思: 给出N,M,N表示有N个物品,M表示背包的容量.接着给出每一个物品的体积和价值,求背包可以装在的最大价值. http://poj.org/problem? id=3624 题目分析: o- ...
- zoj3471(状压dp)
题目连接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4257 题意:不超过10种气体,两两之间相互碰撞可以产生一定的能量,如 ...
- hdu1506(dp求最大子矩阵)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1506 分析: 对于每个单位矩阵,我们先求出连续比它高的最左边的下标假设为l,然后求出比它高的最右边的下 ...
- iOS_UIButton 简单操作
UIButton 风格 typedef NS_ENUM(NSInteger, UIButtonType) { UIButtonTypeCustom = 0, // no button type UIB ...
- Android getTopActivity的方法
使用例如以下方法能够获得top activity 的name public String getTopActivityPackageName(Context context) { String top ...
- 最锋利的Visual Studio Web开发工具扩展:Web Essentials详解
原文:最锋利的Visual Studio Web开发工具扩展:Web Essentials详解 Web Essentials是目前为止见过的最好用的VS扩展工具了,具体功能请待我一一道来. 首先,从E ...
- Android横屏竖屏设置
Android横竖屏设置: 方法一:onCreate()中 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // ...
- Ice-2.1.2在RHEL Server 5.5上的安装
因为项目的需要,服务器上的程序需要使用Ice接口与其它程序通信,对方提供了一个Windows版的工程,我要把它移植到Linux服务器上,既然Ice是跨平台跨语言的中间件,想来移植不是很困难, ...