A web application on ASP.net was launched, next to it is a service (* .svc), now this method is used for their communication (WEb.config):

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

The problem of this method is that it is tied to a specific URL, how to avoid it?

    1 answer 1

    A relative path is possible only if you specify the base address (service / host / baseAdresses), but when deploying, edit the config one way or another.

    And in your case, in fact, there is still no problem, but the happiness that the service is nearby) otherwise, when calling from Ajax, for example, the fun begins :-)