title: 'External Control of File Name or Path' security flaw
body: <p>I have a c# console application where in I need to write some data from database to a flat file. There output file path and the file name are configurable. I did like below:</p>
  
  <pre><code>using (TextWriter tw = new StreamWriter(strWorkingOutputFile, false)) 
  </code></pre>
  
  <p>which is giving following error:</p>
  
  <pre><code>`'External Control of File Name or Path' security flaw.`
  </code></pre>
  
  <p>Basically, wherever we are giving a configurable path it's throwing that flaw. Any idea on how to resolve this? </p>
  
  <p>Thanks so much in advance.</p>