title: Getting the link for a virtual directory
body: <p>I have written a server in C# for a JS client.
  The Solution consists restApi BL and DAL.</p>
  
  <p>The BL creates links for  images stored on a virtual directory, on the server.
  The JS and the server code, are stored in the same directory.</p>
  
  <p>When I build the string of the link I use this line of code:</p>
  
  <pre><code>string keyImageName = Settings.Default.ServerUrl  + 
      Settings.Default.KeyImagesFolder + relatedFinding.KeyImagePath;`
  </code></pre>
  
  <p>where KeyImageFolder is a virtual directory.</p>
  
  <p>It works fine, but my problem is that the website has multiple Amazon instances, one for each geographical zone , so every time I deploy, I need to change the ip in the settings.it's annoying.</p>
  
  <p>Is there a way to get the virtual directory's url, specifically for each machine? </p>
  
  <p>if the JS is installed on the same machine as the server, does it really need a full path?</p>
  
  <p>Many thanks</p>