locked
Manually dispose Request.InputStream? RRS feed

  • Question

  • User-1505052757 posted

    Hi,

    I receive some sensible data using POST in a web application. The processing might take some time (e.g. 20 seconds) so I'm thinking of manually disposing of the request input stream after I have read the data. Are there any gotchas of doing so?

    --
    Werner

    Tuesday, October 22, 2013 7:38 AM

All replies

  • User-488622176 posted

    You can always try to dispose it, but I doubt it is a good idea. You do not control the lifecycle of this object, so enforcing things may have very unwanted side effects.

    Tuesday, October 22, 2013 7:53 AM
  • User-1505052757 posted

    Yes my thoughts exactly. But you don't know anything for sure?
    Initial tests show no side-effects though...

    Tuesday, October 22, 2013 8:24 AM
  • User-488622176 posted

    I have not found any info on this behavior, so I consider it "undocumented", hence potentially unstable :-)

    Wednesday, October 23, 2013 8:08 AM
  • User-1505052757 posted

    Ok, thanks for your advice.

    Monday, October 28, 2013 4:09 AM