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接收到一个请求时, 这个请求实际上会有两个线程在执行这个请求. 一 ...
随机推荐
- Python 实现的下载op海贼王网的图片(网络爬虫)
没得事就爬一下我喜欢的海贼王上的图片 须要在d盘下建立一个imgcache目录 # -*- coding: utf-8 -*- import urllib import urllib2 import ...
- ffplay2 android 版正式公布
项目地址:https://github.com/DeYangLiu/AndroidPlayer/ 下载链接: 看点: 支持软键盘输入和历史记录.使用了EditText和内部存储. 这里考虑了历史记录的 ...
- Xsoup 是一款基于 Jsoup 开发的
Xsoup 是一款基于Jsoup 开发的,使用XPath抽取Html元素的工具.它被用于作者的爬虫框架 WebMagic 中,进行XPath 解析和抽取. 此次更新主要增加了一些XPath语法的支持. ...
- A Game of Thrones(14) - Catelyn
Ned and the girls were eight days gone when Maester Luwin came to her one night in Bran’s sickroom, ...
- HDU 4028 The time of a day STL 模拟题
暴力出奇迹.. #include<stdio.h> #include<iostream> #include<algorithm> #include<vecto ...
- STL 源代码剖析 算法 stl_numeric.h -- copy
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie copy //唯一对外接口 /*------------------------------ ...
- [置顶] 生成学习算法、高斯判别分析、朴素贝叶斯、Laplace平滑——斯坦福ML公开课笔记5
转载请注明:http://blog.csdn.net/xinzhangyanxiang/article/details/9285001 该系列笔记1-5pdf下载请猛击这里. 本篇博客为斯坦福ML公开 ...
- 使用VBA将批量的WORD文档转换为PDF
Sub BatchConvertToPDF() Dim destFolderPath As String destFolderPath = GetFolderPath If destFolderPat ...
- 悟道—位IT高管20年的职场心经(读书笔记五)
悟道--一位IT高管20年的职场心经 第五章 搞定老板 "老板就是老板" 这一点,你可能会忘了,他一定不会忘: "老板不会总是老板" 这一点,他可能会忘,你最好 ...
- 国庆去学校的国际象棋(Latex)
国庆节去学棋与朋友. 看国外的网站更有趣的事情. 很快打下来. 首先效应: 嘿嘿 代码来了哟: \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc ...