P
Phil Johnson
Hello,
I have an issue with some code I am updating:
An entire file is loaded into a memory stream then that memory stream uses
its WriteTo method to write to the responses output stream. With larger
files (250 mb) I get a system out of memory exception because the whole file
is loaded into RAM.
I need to modify this so the file is buffered into the output stream (maybe
via a filestream?) to avoid the whole file being loaded into ram.
Does anybody have any good example code or links of how to do this?
Thanks in advance for any help.
I have an issue with some code I am updating:
An entire file is loaded into a memory stream then that memory stream uses
its WriteTo method to write to the responses output stream. With larger
files (250 mb) I get a system out of memory exception because the whole file
is loaded into RAM.
I need to modify this so the file is buffered into the output stream (maybe
via a filestream?) to avoid the whole file being loaded into ram.
Does anybody have any good example code or links of how to do this?
Thanks in advance for any help.