http://stackoverflow.com/questions/18720810/wcf-service-base-address-vs-endpoint-address

baseAddress is just that, the base address for your endpoints (unless specified explicitly).

So every <endpoint> will inherit from <baseAddress> (which is why they are usually "" and "mex"). e.g.

<baseAddresses>
<add baseAddress="http://127.0.0.1:1337/" />
</baseaddresses>
...
<endpoint address="" contract="MyService.IMyContract" ... />
<endpoint address="mex" contract="IMetadataExchange" ... />

You now have two endpoints:

http://127.0.0.1:1337/ - service endpoint
http://127.0.0.1:1337/mex - metadata endpoint
By exempting the <baseAddress> you're requiring the <endpoints> to both be fully qualified (including the mex (which is not)). e.g.

exempt 免除;豁免  省略了baseAddress,然后就要求endpoint中的地址是完全限定的

<baseAddresses></baseaddresses>
...
<endpoint address="net.tcp://127.0.0.1:1337/" contract="MyService.IMyContract" ... />
<endpoint address="http://127.0.0.1:1337/mex" contract="IMetadataExchange" ... />

You now have two different endpoints:

net.tcp://127.0.0.1:1337/ - service endpoint
http://127.0.0.1:1337/mex - metadata endpoint

WCF Host中的BaseAddress 和 Endpoint中的Address的区别的更多相关文章

  1. WCF :IIS寄宿方式的Web地址、BaseAddress和EndPoint Address的关系

    对于在IIS中通过W3SVC或WAS寄宿的WCF Service,其在浏览器中显示的地址(Web地址),与其配置文件中的BaseAddress和EndPoint Address有什么关系呢?让我们来分 ...

  2. [WCF实践]1.WCF使用net.tcp寄宿到IIS中

    一.IIS部分 环境:Windows Server 2008 R2 1.安装WAS,如下图所示:   2.网站net.tcp协议绑定,如下图所示:   3.网站启用net.tcp,如下图所示:   二 ...

  3. WCF使用net.tcp寄宿到IIS中(转)

    一.IIS部分 环境:Windows Server 2008 R2 1.安装WAS,如下图所示:   2.网站net.tcp协议绑定,如下图所示:   3.网站启用net.tcp,如下图所示:   二 ...

  4. 将WCF寄宿在托管的Windows服务中

    在我之前的一篇博客中我介绍了如何发布WCF服务并将该服务寄宿于IIS上,今天我再来介绍一种方式,就是将WCF服务寄宿在Windows服务中,这样做有什么好处呢?当然可以省去部署IIS等一系列的问题,能 ...

  5. WCF使用net.tcp寄宿到IIS中

    一.IIS部分 1. 安装WAS,如下图所示: 2. 网站net.tcp协议绑定,如下图所示: 3. 网站启用net.tcp,如下图所示: 二.WCF代码部分 1. DesignCaseService ...

  6. WCF技术剖析之八:ClientBase<T>中对ChannelFactory<T>的缓存机制

    原文:WCF技术剖析之八:ClientBase<T>中对ChannelFactory<T>的缓存机制 和传统的分布式远程调用一样,WCF的服务调用借助于服务代理(Service ...

  7. 在 VS 类库项目中 Add Service References 和 Add Web References 的区别

    原文:在 VS 类库项目中 Add Service References 和 Add Web References 的区别 出身问题: 1.在vs2005时代,Add Web Reference(添加 ...

  8. Wcf host

    Uri baseAddress = new Uri(uri);//var binding = new WebHttpBinding(WebHttpSecurityMode.None); var bas ...

  9. 客户机中PLSQL DEV访问虚拟机中的ORCLE11g,错误百出!

    客户机中PLSQL DEV访问虚拟机中的ORCLE11g,错误百出! 创建时间: 2017/10/14 18:44 作者: CNSIMO 标签: ORACLE 忙了一下午,只有两个字形容:麻烦!   ...

随机推荐

  1. 最近整理的一些行列转换sql(有自己的,有别人的),留作记录

    --case when 经典用法SELECT * FROM        (SELECT 1 NUM,              '奖项金额',              SUM(CASE WHEN ...

  2. CSS和JS样式属性对照表

    注意:1.CSS中的float属性是个例外,因为float是javascript的保留关键字,在IE中使用的是styleFloat,而其他浏览器则使用cssFloat. 盒子标签和属性对照 CSS语法 ...

  3. cyark - 数字方舟(看侣行第三季时发现的)

    数字方舟 Ben Kacyra

  4. Python没有执行__init__

    疑惑 提出问题 前天同事问我一个问题,为什么这个脚本中的没有调用A 的__init__.脚本如下: class A(object): def __init__(self, *args, **kwarg ...

  5. spring拦截器

    一:拦截器配置 <!-- 拦截器 --> <mvc:interceptors> <mvc:interceptor> <mvc:mapping path=&qu ...

  6. ubuntu 下安装软件,卸载,查看已经安装的软件

    参考网址:http://wiki.ubuntu.org.cn/UbuntuSkills 一般的安装程序用三种: .deb 和.rpm 这两种安装文件 .bundle 这是二进制的安装文件 而 tar. ...

  7. CentOS 6.4 使用YUM 安装MySQL5.5

    1.首先需要下载Yum的支持包: http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm 2.下载完成后将Yum库导入到你的 ...

  8. 玩转HTML5移动页面(优化篇)

    原文:http://www.grycheng.com/?p=472 承接上文<玩转HTML5移动页面(动效篇)>,上次说的是让页面动起来的一些小技巧.而页面动起来的根基是功能可用的页面,因 ...

  9. hadoop1——map到reduce中间的shuffle过程

    ---恢复内容开始--- shuffle和排序 过程图如下: MapReduce确保每个reduce的输入都按键排序,系统执行排序的过程——将map输出作为输入传给reduce——成为shuffle, ...

  10. nginx 反向代理 odoo, 速度提升

    1: sudo apt-get  install nginx 2:  add server: 在/etc/nginx/sites-enabled 中增加一个可用的server. 文件如下图所示 3:重 ...