I have a streamreader that is called to read a response back from an FTP Web Request. I need to keep the reader open the whole time I am processing some files I am downloading from the FTP site to a local directory. Because of the size of the files, I am able to pull 3 of them and process them, but before the 4th file processes, I get an error stating that:
The underlying connection was closed: An unexpected error occurred on a receive.
Digging into the error message in the locals window shows me the streamreader object threw an exception of type System.ObjecDisposedException.
This being said, the reader is timing out before I am finished with the files. Is there a way around this?