Professional Web Applications Themes

Response.Buffer - ASP.NET General

When streaming a file attachment to the response stream, should I set Response.BufferOutput = False or Response.Buffer = False or both? TIA~PJ...

  1. #1

    Default Response.Buffer

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

    Response.BufferOutput = False

    or

    Response.Buffer = False

    or both?

    TIA~PJ


    PJ Guest

  2. #2

    Default Re: Response.Buffer

    Neither are necessary.

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


    "PJ" <pjwalhotmail.com> wrote in message
    news:%23BxjVeHUDHA.1280TK2MSFTNGP12.phx.gbl...
    > 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 Guest

  3. #3

    Default Re: Response.Buffer

    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" <SteveOrr.net> wrote in message
    news:%239i$QgHUDHA.2420TK2MSFTNGP10.phx.gbl...
    > Neither are necessary.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > "PJ" <pjwalhotmail.com> wrote in message
    > news:%23BxjVeHUDHA.1280TK2MSFTNGP12.phx.gbl...
    > > When streaming a file attachment to the response stream, should I set
    > >
    > > Response.BufferOutput = False
    > >
    > > or
    > >
    > > Response.Buffer = False
    > >
    > > or both?
    > >
    > > TIA~PJ
    > >
    > >
    >
    >

    PJ Guest

  4. #4

    Default Re: Response.Buffer

    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
    [url]http://Steve.Orr.net[/url]


    "PJ" <pjwalhotmail.com> wrote in message
    news:evj6fGIUDHA.2520tk2msftngp13.phx.gbl...
    > 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" <SteveOrr.net> wrote in message
    > news:%239i$QgHUDHA.2420TK2MSFTNGP10.phx.gbl...
    > > Neither are necessary.
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > [url]http://Steve.Orr.net[/url]
    > >
    > >
    > > "PJ" <pjwalhotmail.com> wrote in message
    > > news:%23BxjVeHUDHA.1280TK2MSFTNGP12.phx.gbl...
    > > > 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 Guest

  5. #5

    Default Re: Response.Buffer

    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" <SteveOrr.net> wrote in message
    news:%23oHXbUKUDHA.2116TK2MSFTNGP12.phx.gbl...
    > 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
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > "PJ" <pjwalhotmail.com> wrote in message
    > news:evj6fGIUDHA.2520tk2msftngp13.phx.gbl...
    > > 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" <SteveOrr.net> wrote in message
    > > news:%239i$QgHUDHA.2420TK2MSFTNGP10.phx.gbl...
    > > > Neither are necessary.
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > [url]http://Steve.Orr.net[/url]
    > > >
    > > >
    > > > "PJ" <pjwalhotmail.com> wrote in message
    > > > news:%23BxjVeHUDHA.1280TK2MSFTNGP12.phx.gbl...
    > > > > When streaming a file attachment to the response stream, should I
    set
    > > > >
    > > > > Response.BufferOutput = False
    > > > >
    > > > > or
    > > > >
    > > > > Response.Buffer = False
    > > > >
    > > > > or both?
    > > > >
    > > > > TIA~PJ
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    PJ Guest

  6. #6

    Default Re: Response.Buffer

    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
    [url]http://Steve.Orr.net[/url]


    "PJ" <pjwalhotmail.com> wrote in message
    news:OQlYPdLUDHA.1364TK2MSFTNGP10.phx.gbl...
    > 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" <SteveOrr.net> wrote in message
    > news:%23oHXbUKUDHA.2116TK2MSFTNGP12.phx.gbl...
    > > 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
    > > [url]http://Steve.Orr.net[/url]
    > >
    > >
    > > "PJ" <pjwalhotmail.com> wrote in message
    > > news:evj6fGIUDHA.2520tk2msftngp13.phx.gbl...
    > > > 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" <SteveOrr.net> wrote in message
    > > > news:%239i$QgHUDHA.2420TK2MSFTNGP10.phx.gbl...
    > > > > Neither are necessary.
    > > > >
    > > > > --
    > > > > I hope this helps,
    > > > > Steve C. Orr, MCSD
    > > > > [url]http://Steve.Orr.net[/url]
    > > > >
    > > > >
    > > > > "PJ" <pjwalhotmail.com> wrote in message
    > > > > news:%23BxjVeHUDHA.1280TK2MSFTNGP12.phx.gbl...
    > > > > > 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 Guest

Similar Threads

  1. Replies: 5
    Last Post: April 12th, 02:24 AM
  2. Replies: 0
    Last Post: October 4th, 02:33 AM
  3. Replies: 0
    Last Post: August 23rd, 09:14 AM
  4. Response.buffer doesnt work
    By Copa in forum ASP
    Replies: 0
    Last Post: August 21st, 05:13 PM
  5. Replies: 0
    Last Post: July 5th, 04:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139