If your System.IO.Stream is a System.IO.MemoryStream you can just call
Response.BinaryWrite(memoryStream.ToArray());
If it is not, maybe the object you want to output provides
a method for saving to a System.IO.Stream, like System.Drawing.Image does;
then you can just do this:
myImage.Save(Response.OutputStream);
If not, do:
(where "stream" variable represent the System.IO.Stream instance you want to
output):
byte [] data = new byte [stream.Length];
stream.Read(data, 0x0, data.Length);
Response.BinaryWrite(data);
This will fill a byte array with the content of "stream" and write to the
response output stream.
Note; always clear the response before writing binary data,
otherwise the binary data might get corrupted.
Do this by calling
Response.Clear();
Response.ClearContent();
prior to the binary write operation.
Also, you should provide information about the content type of the binary
data that will be written
to the response object, eg:
Response.ContentType = "image/png";
if it is a PNG binary stream.
Regards, Dennis