title: How can I change the address of a WCF service reference?
body: <p>I have an application which is used internally and uses WCF for communication between client and server portions, however it will soon need deploying to sites where server names are different. The WCF services are hosted as a Windows service using the netTcp binding. At the moment, the addresses of the services are specified using the Add Service Reference command in Visual Studio.</p>
  
  <p>Is it possible to make the base address of the WCF services a user preference, and then make the service reference dynamically construct the URL when it needs to use.</p>
  
  <p>So for example, if I had a service named "CustomerService", is it possible for two separate users in different places to specify the addresses:</p>
  
  <pre><code>net-tcp://myserver1/
  </code></pre>
  
  <p>and</p>
  
  <pre><code>net-tcp://anotherserver/
  </code></pre>
  
  <p>and have the service reference convert these as necessary into</p>
  
  <pre><code>net-tcp://myserver1/CustomerService
  </code></pre>
  
  <p>and</p>
  
  <pre><code>net-tcp://anotherserver/CustomerService?
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Jim</p>