简体   繁体   中英

WCF Endpoint URL

If this is in the wrong section of Stackoverflow forgive me. But I have a web application that references a wcf web service on the same web server, it is just in a different virtual directory

What is the best endpoint URL to use to access the web service for performance (http://)

[computer name].domain.corpad.net/webservice
[computer name]/webservice
[ip address]/webservice
[external web address]/webservice

It very much depends on your situation. The only criteria you give here is performance. In this case the address is the least of you concerns since it is configurable anyways. When you use host names they need to be resolved. Of course it would be cached and all but that is about it. Which name to choose also depends on the configuration of your server. Which IPs it has, to which IPs the server is bound to, How Names are resolved. Using IP seems to be quickest if you neglect the price of name resolution. Now, the best performance optimization you would get from binding. If you service is always local named pipes for transport would be the best. Also, you need to choose the right serialization which again depends on situation. If compatibility is not an issue then binary would win.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM