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

相关文章:

  • 2022-12-23
  • 2021-08-22
  • 2021-09-15
  • 2021-04-09
  • 2021-09-29
  • 2022-01-13
  • 2021-07-03
猜你喜欢
  • 2021-12-03
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案