0

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:

using (TextWriter tw = new StreamWriter(strWorkingOutputFile, false)) 

which is giving following error:

`'External Control of File Name or Path' security flaw.`

Basically, wherever we are giving a configurable path it's throwing that flaw. Any idea on how to resolve this?

Thanks so much in advance.

Darshana
  • 2,416
  • 6
  • 26
  • 50
user1147759
  • 35
  • 1
  • 7

0 Answers0