How to copy a large stream to another without OutOfMemoryException in C#

45 Views Asked by At

I'm working on synchronizing two systems using their apis. How can i copy a massive response stream (of HttpWebResponse) to a request stream (of HttpWebRequest) without having OutOfMemoryException in C#.

CopyTo is throwing out of memory exception and I can't use byte arrays as well because they allocate contiguous memory blocks...

0

There are 0 best solutions below