i was trying to write a string to a memory stream, but failed with the error message:
Memory stream is not expandable.
the line of code that pr
When you create a MemoryStream
from a byte array, you essentially create a wrapper around said array. Which means the stream's buffer cannot expand once it reaches its capacity.
However, an HttpResponse.Filter
is essentially that: a filter. The documentation states:
When you create a Stream object and set the Filter property to the Stream object, all HTTP output sent by Write passes through the filter.
So data ends up being written to the MemoryStream
. So it would help to know what you're trying to achieve with this, exactly, because a MemoryStream
would not make a useful filter...