Differences between address in baseaddress and endpoint in WCF host

Source: Internet
Author: User

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

BaseAddress is just this, the base address for your endpoints (unless specified explicitly).

So every <endpoint> would inherit from <baseAddress> (which is what they is 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 are now having both endpoints:

http://127.0.0.1:1337/-Service Endpoint
Http://127.0.0.1:1337/mex-metadata Endpoint
By exempting the <baseAddress> your re requiring the <endpoints> to both be fully qualified (including the MEX (which is not)). e.g.

Exempt exemptions omit baseaddress and then require that the address in the endpoint be fully qualified

<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 the different endpoints:

net.tcp://127.0.0.1:1337/-Service Endpoint
Http://127.0.0.1:1337/mex-metadata Endpoint

Differences between address in baseaddress and endpoint in WCF host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.