troubleshooting Question

Streamreader Timing out

Avatar of Abacus IT
Abacus ITFlag for United States of America asked on
4 Comments1 Solution422 ViewsLast Modified:
Hello Everyone,

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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros