WCF Host 의 BaseAddress 와 Endpoint 의 Address 의 차이

2459 단어 host
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 will inherit from (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 endpointhttp://127.0.0.1:1337/mex - metadata endpointBy exempting the you're requiring the 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 endpointhttp://127.0.0.1:1337/mex - metadata endpoint

좋은 웹페이지 즐겨찾기