title: Could not find a part of the path 'C:\Program Files (x86)\IIS Express\~\TextFiles\ActiveUsers.txt'
body: <p>I tried many ways to access a text file in my Visual Studio 2012 Solution from a folder named <code>TextFiles</code></p>
  
  <pre><code>using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"~/TextFiles/ActiveUsers.txt", true))
  {
      file.WriteLine(model.UserName.ToString());
  }
  </code></pre>
  
  <p>But it kept on throwing the error </p>
  
  <blockquote>
    <p>Could not find a part of the path 'C:\Program Files (x86)\IIS
    Express\~\TextFiles\ActiveUsers.txt'.</p>
  </blockquote>
  
  <p>Not sure where I made a mistake </p>