How to specify the WCF service URL

The web application is running on ASP.net, next to it is a service (*. svc), now this method is used to connect them (WEb. config):

<client>
<endpoint address="http://localhost/GiService.svc" binding="basicHttpBinding"
contract="RespService.IProcess"/>
</client>

The problem with this method is that it is linked to a specific URL, how can I avoid this?

Author: Зуев Владимир, 2013-05-18

1 answers

The relative path is possible only if you specify the base address (service/host/baseAdresses), but when deploying, edit the config anyway.

And in your case, it's not really a problem, but happiness that the service is nearby) otherwise, when calling from Ajax, for example, the fun begins: -)

 1
Author: Spawn, 2013-05-18 12:51:03