Stop using StreamWriter and implement custom TextWriter.
- Write directly to the response if under 2K
- Write in 3K chunks if over 2K limit directly to the response.