title: WCF in Windows Service. How do I change the endpoint address (PORT) using app.config and apply an updated data to wcf in windows service?
body: <p>I'd developed a WCF Service using netTCPBinding and embedded it in a Windows Service. </p>
  
  <p>The configuration data of wcf is located in standart app.config file.</p>
  
  <p>After that i had created an installation project and include my code (wcf in widows service) there. So I have the setup.exe file to install my windows service with wcf on board. </p>
  
  <p>I've installed the windows service to my local drive (C:\Programs Files...\Service) and started it using the services page (pane) of my OS.</p>
  
  <p>It works fine. </p>
  
  <p>The app.config file was copied to the local drive and located across the same folder (C:\Programs Files...\Service).</p>
  
  <p>One day i've tried to change the part of my endpoint address (PORT) in app.config (C:\Program Files...\app.config) and restarted the service using an appropriate page of services (services.msc) in windows. </p>
  
  <p>I thought that the service would be working on another port (I've setted in app.config) but i was wrong. The service continued working on the previous PORT. As I've understood, it continued working using the copy of starting version of app.config. It stores the copy of this file in another path.</p>
  
  <p>I need the ability to change the app.config file and get the updated windows service after it's restarting.</p>
  
  <p>I am going to let my users set the specified port number where the developed wcf service will listening to.</p>
  
  <p>Where am I wrong? Could you help me to find the solution of my problem?</p>
  
  <p>Thank you for your help.</p>