1首先上一张wcf通讯图

a.Proxy代理部分底层调用的是 xxxxClient=> ChannelFactory=>IInpuChannel/IOutChannel...

b.Transaction、Encoding、Security、transport这些则被封装在了协议栈里面 如BasicHttpBinding协议栈

2.很重要的一个知识点,当创建一个binding节点要使其有效,我们要在endPoint节点中添加一个bindingConfiguration的属性,将属性值设置成我们定义的binding节点的名字。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<system.serviceModel>
<!--以下 新加入的bindings节点-->
<bindings>
<netTcpBinding>
<binding name="MyBinding">
<security mode="None"></security><!--不要安全-->
</binding>
</netTcpBinding>
</bindings>
<!--以上 新加入的bindings节点--> <behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="WcfService.HomeService">
<host>
<baseAddresses>
<!--<add baseAddress="http://localhost:8733/Design_Time_Addresses/WcfService/HomeService/" />-->
<add baseAddress="http://localhost:8733/Design_Time_Addresses/WcfService/HomeService" />
</baseAddresses>
</host>
<!--在endPoint这个节点的最后加入了属性 MyBinding-->
<endpoint address="" binding="netTcpBinding" contract="WcfService.IHomeService" bindingConfiguration="MyBinding">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service>
</services>
</system.serviceModel>
</configuration>

3 WCF一些基础铺垫的更多相关文章

  1. 第一章:Python数据分析前的基础铺垫

    本节概要 - 数据类型 - 数据结构 - 数据的常用操作方法 数据类型 基础铺垫 定义 我们搞数据时,首先要告诉Python我们的数据类型是什么 数值型:直接写一个数字即可 逻辑型:True,Fals ...

  2. 关于WCF一些基础。

    关于WCF Windows Communication Foundation(WCF)是由微软发展的一组数据通信的应用程序开发接口,可以翻译为Windows通讯接口,它是.NET框架的一部分.由 .N ...

  3. WCF系列 基础概念

    WCF全称Windows Communication Foundation,是微软构建面向服务的分布式编程框架.而它其实是统一了COM和.Net Remoting等分布式技术提供一个完整,通用,可靠的 ...

  4. WCF REST 基础教程

    概述 Representational State Transfer(REST)是Roy Fielding博士在2000年他的博士论文中提出来的一种软件架构风格. 因此REST是设计风格而不是标准,R ...

  5. WCF Windows基础通信

    概述 WCF,Windows Communication Foundation ,Windows通信基础, 面向服务的架构,Service Orientation Architechture=SOP ...

  6. Ubuntu使用小结(主要为后面部署K8s集群做基础铺垫)

    包管理 dpkg -L libxml2 #查看libxml2安装了些什么文件 dpkg -s /usr/bin/ls      #查看ls是那个包提供的 dpkg -c abc.deb #查看abc. ...

  7. WCF入门教程:WCF基础知识问与答(转)

    学习WCF已有近两年的时间,其间又翻译了Juval的大作<Programming WCF Services>,我仍然觉得WCF还有更多的内容值得探索与挖掘.学得越多,反而越发觉得自己所知太 ...

  8. WCF 学习系列——WCF的学习基础

    这个系列的博客由WCF4 高级编程学习记录,如有错误请指正. 首先介绍一些概念: SOA: (Service-Oriented Architecture 面向服务架构),一种架构方法,也是一种编程模式 ...

  9. WCF服务承载(笔记)

    自托管(也做自承载) 承载 WCF 服务最灵活.最便捷的方法就是进行自承载.要能够自承载服务,必须满足两个条件.第一,需要 WCF 运行时:第二,需要可以承载 ServiceHost 的托管 .NET ...

随机推荐

  1. [Flexbox] Use Flex to Scale Background Image

    In this lesson we will use Flexbox to scale a background image to fit on the screen of our React Nat ...

  2. Understanding Cubert Concepts(一)Partitioned Blocks

    Understanding Cubert Concepts(一)Partitioned Blocks Cubert Concepts 对于Cubert,我们要理解其核心的一些概念,比方BLOCK.这些 ...

  3. php课程 8-28 php如何绘制生成显示图片

    php课程 8-28 php如何绘制生成显示图片 一.总结 一句话总结:gd库轻松解决 1.php图片操作生成的图的两种去向是什么? 一种在页面直接输出,一种存进本地磁盘 2.php操作图片的库有哪些 ...

  4. [Redis专辑][1]ubuntu12.04下安装php-redis的方法和步骤

    首次公布路径:phpredis的安装 非常久非常久没有写博文了,好多博文都没有整理完成,今天才抽时间整理完这一篇博文,希望能对大家有一定的帮助 首先对redis做个简单的介绍: Redis 是全然开源 ...

  5. bc -l 对于 %取模计算出错

    https://yq.aliyun.com/articles/279384 expr % expr    The  result of the expression is the "rema ...

  6. 【u124】环状最大两段子段和

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] 给出一段环状序列,即认为A[1]和A[N]是相邻的,选出其中连续不重叠且非空的两段使得这两段和最大. ...

  7. ios开发网络学习十:利用文件句柄实现大文件下载

    #import "ViewController.h" @interface ViewController ()<NSURLSessionDataDelegate> @p ...

  8. 《SAS编程与数据挖掘商业案例》学习笔记之十二

    本次重点在:sas数据集管理 主要包含:包含数据集纵向拼接.转置.排序.比較.复制.重命名.删除等 1.append语句 注:base数据集和data两个数据集必须结构一样.避免使用force的情况, ...

  9. ios开发事件处理之:一:UIView的拖拽

    1.ios当中常⽤的事件?  触摸事件 ,加速计事件 ,远程控制事件 2.什么是响应者对象? 继承了UIResponds的对象我们称它为响应者对象 UIApplication.UIViewContro ...

  10. Django之文章归档

    1.任务描述:将博文按照时间月份归档 2.源代码: views.py def getPage(request, article_list): paginator = Paginator(article ...