title: WebClient.DownloadFile path problems
body: <p>I am using WebClient.DownloadFile to download an image to a local repository as follows:</p>
  
  <pre><code>            WebClient myWC = new WebClient();
              myWC.Credentials = new System.Net.NetworkCredential(username, password);
              string photoPath = @"\images\Employees\" + employee + ".jpg";
              myWC.DownloadFile(userResult[12].Values[0].Value.ToString(), photoPath);
  </code></pre>
  
  <p>My expected results were as follows: My web app is deployed here:</p>
  
  <blockquote>
    <p>C:\Inetpub\wwwroot\MyWebApp</p>
  </blockquote>
  
  <p>I expected this to save the photo to </p>
  
  <blockquote>
    <p>C:\Inetpub\wwwroot\MyWebApp\images\Employees...</p>
  </blockquote>
  
  <p>Instead, all my photos get saved here:</p>
  
  <blockquote>
    <p>C:\images\Employees</p>
  </blockquote>
  
  <p>I guess I don't completely understand the <code>DownloadFile</code> method because I felt like the path should be relative to the directory the app is deployed in. How can I change the path so that it is relative to the directory of the app?</p>
  
  <p><strong>Note:</strong> I don't want to use a physical path because I have a Dev and QA site and I don't want the paths to break if things get moved around.</p>