Read data using ReadLine()
and write using WriteLine()
instead of ReadToEnd()
and WriteToEnd()
.
Remove this line:
_WriteResult.Write(sr3.ReadToEnd());
And modify your code with this:
string readval = sr3.ReadLine();
while(readval != null)
{
_WriteResult.WriteLine(readval);
readval = sr3.ReadLine();
}
For more details, see the documentation.