zoukankan      html  css  js  c++  java
  • WCF Host中的BaseAddress 和 Endpoint中的Address的区别

    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

  • 相关阅读:
    图论4-floyd
    。。。
    [LOJ10164]数字游戏
    KMP模板
    无向图割点模板
    tarjan有向图模板
    LCA倍增模板
    P2149 [SDOI2009]Elaxia的路线
    树的直径dp模板
    [暑假集训]Day4 T3 平板涂色
  • 原文地址:https://www.cnblogs.com/chucklu/p/4652259.html
Copyright © 2011-2022 走看看