Response.Buffer

Discussion in 'ASP .Net' started by PJ, Jul 22, 2003.

  1. PJ

    PJ Guest

    When streaming a file attachment to the response stream, should I set

    Response.BufferOutput = False

    or

    Response.Buffer = False

    or both?

    TIA~PJ
     
    PJ, Jul 22, 2003
    #1
    1. Advertising

  2. Neither are necessary.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "PJ" <> wrote in message
    news:%...
    > When streaming a file attachment to the response stream, should I set
    >
    > Response.BufferOutput = False
    >
    > or
    >
    > Response.Buffer = False
    >
    > or both?
    >
    > TIA~PJ
    >
    >
     
    Steve C. Orr, MCSD, Jul 22, 2003
    #2
    1. Advertising

  3. PJ

    PJ Guest

    Do you mean: Neither or necessary if you Flush the stream every time in the
    loop?

    Also, are one or both of these methods needed...
    Response.Close()
    Response.End()

    "Steve C. Orr, MCSD" <> wrote in message
    news:%239i$...
    > Neither are necessary.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    >
    >
    > "PJ" <> wrote in message
    > news:%...
    > > When streaming a file attachment to the response stream, should I set
    > >
    > > Response.BufferOutput = False
    > >
    > > or
    > >
    > > Response.Buffer = False
    > >
    > > or both?
    > >
    > > TIA~PJ
    > >
    > >

    >
    >
     
    PJ, Jul 22, 2003
    #3
  4. If you are streaming a single file through your page, and you haven't output
    any HTML in this page, then none of the statements you've mentioned are
    necessary for the file download to be successful.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "PJ" <> wrote in message
    news:...
    > Do you mean: Neither or necessary if you Flush the stream every time in

    the
    > loop?
    >
    > Also, are one or both of these methods needed...
    > Response.Close()
    > Response.End()
    >
    > "Steve C. Orr, MCSD" <> wrote in message
    > news:%239i$...
    > > Neither are necessary.
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > http://Steve.Orr.net
    > >
    > >
    > > "PJ" <> wrote in message
    > > news:%...
    > > > When streaming a file attachment to the response stream, should I set
    > > >
    > > > Response.BufferOutput = False
    > > >
    > > > or
    > > >
    > > > Response.Buffer = False
    > > >
    > > > or both?
    > > >
    > > > TIA~PJ
    > > >
    > > >

    > >
    > >

    >
    >
     
    Steve C. Orr, MCSD, Jul 23, 2003
    #4
  5. PJ

    PJ Guest

    you appear correct w/ the .Buffer and End properties (as long as i set the
    Content-Length header), but if i don't call .Flush() in the loop, then
    asp.net will buffer the entire response in memory before the open/save
    dialog box appears on the client. this is no good for the large file
    downloads we have to


    "Steve C. Orr, MCSD" <> wrote in message
    news:%...
    > If you are streaming a single file through your page, and you haven't

    output
    > any HTML in this page, then none of the statements you've mentioned are
    > necessary for the file download to be successful.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    >
    >
    > "PJ" <> wrote in message
    > news:...
    > > Do you mean: Neither or necessary if you Flush the stream every time in

    > the
    > > loop?
    > >
    > > Also, are one or both of these methods needed...
    > > Response.Close()
    > > Response.End()
    > >
    > > "Steve C. Orr, MCSD" <> wrote in message
    > > news:%239i$...
    > > > Neither are necessary.
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > http://Steve.Orr.net
    > > >
    > > >
    > > > "PJ" <> wrote in message
    > > > news:%...
    > > > > When streaming a file attachment to the response stream, should I

    set
    > > > >
    > > > > Response.BufferOutput = False
    > > > >
    > > > > or
    > > > >
    > > > > Response.Buffer = False
    > > > >
    > > > > or both?
    > > > >
    > > > > TIA~PJ
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    PJ, Jul 23, 2003
    #5
  6. Right, the methods exist mostly for performance reasons. They can improve
    performance and scalability in certain situations such as the one you've
    mentioned. But they are not necessary; they are optimizations.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "PJ" <> wrote in message
    news:...
    > you appear correct w/ the .Buffer and End properties (as long as i set the
    > Content-Length header), but if i don't call .Flush() in the loop, then
    > asp.net will buffer the entire response in memory before the open/save
    > dialog box appears on the client. this is no good for the large file
    > downloads we have to
    >
    >
    > "Steve C. Orr, MCSD" <> wrote in message
    > news:%...
    > > If you are streaming a single file through your page, and you haven't

    > output
    > > any HTML in this page, then none of the statements you've mentioned are
    > > necessary for the file download to be successful.
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > http://Steve.Orr.net
    > >
    > >
    > > "PJ" <> wrote in message
    > > news:...
    > > > Do you mean: Neither or necessary if you Flush the stream every time

    in
    > > the
    > > > loop?
    > > >
    > > > Also, are one or both of these methods needed...
    > > > Response.Close()
    > > > Response.End()
    > > >
    > > > "Steve C. Orr, MCSD" <> wrote in message
    > > > news:%239i$...
    > > > > Neither are necessary.
    > > > >
    > > > > --
    > > > > I hope this helps,
    > > > > Steve C. Orr, MCSD
    > > > > http://Steve.Orr.net
    > > > >
    > > > >
    > > > > "PJ" <> wrote in message
    > > > > news:%...
    > > > > > When streaming a file attachment to the response stream, should I

    > set
    > > > > >
    > > > > > Response.BufferOutput = False
    > > > > >
    > > > > > or
    > > > > >
    > > > > > Response.Buffer = False
    > > > > >
    > > > > > or both?
    > > > > >
    > > > > > TIA~PJ
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Steve C. Orr, MCSD, Jul 23, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9l?=

    Response.Buffer vs. Response.BufferOutput

    =?Utf-8?B?Sm9l?=, Oct 24, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    9,231
    Vadivel Kumar
    Oct 25, 2005
  2. Raja
    Replies:
    12
    Views:
    24,437
    John Harrison
    Jun 21, 2004
  3. Replies:
    2
    Views:
    607
    sergejusz
    Mar 26, 2007
  4. Neal Becker

    buffer creates only read-only buffer?

    Neal Becker, Jan 8, 2009, in forum: Python
    Replies:
    0
    Views:
    416
    Neal Becker
    Jan 8, 2009
  5. xingye
    Replies:
    9
    Views:
    276
    Michael Lu
    Apr 19, 2004
Loading...

Share This Page