Multiple Requests (windows)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PJ

    #1

    Multiple Requests (windows)

    My web application will open a popup that, upon a user action, will initiate
    a request that will result in a file being sent as an attachment to the
    client. The download works fine, except that the user is no longer able to
    browse and get responses in the main window. The request just seems to hang
    and does not get the response until the download is finished. It only seems
    to effect the session in which the download is taking place. Other clients,
    even on the same computer, are not experiencing request/response issues. I
    doubt it's an issue with the server side code I am using for the download,
    but here it is nonetheless. Any advice on this issue would be greatly
    appreciated. TIA~ PJ

    Dim br As New BinaryReader(fs )
    Dim offset As Long
    Response.Clear( )
    Response.Buffer Output = False
    Response.Buffer = False
    Response.Conten tType = "applicatio n/octet-stream"
    Response.AddHea der("Content-Disposition", "attachment ; filename=" +
    fileName)
    Response.AddHea der("Content-Length", fs.Length.ToStr ing())
    Response.Flush( )

    Dim totalSize As Long = fs.Length
    Dim size As Long
    Do
    If offset + CHUNK_SIZE > totalSize Then
    size = totalSize - offset
    Else
    size = CHUNK_SIZE
    End If
    If Not Response.IsClie ntConnected Then
    Exit Do
    End If
    Response.Binary Write(br.ReadBy tes(Convert.ToI nt32(size)))
    fs.Flush()
    Response.Flush( )
    offset += size
    Loop Until offset >= totalSize
    fs.Close()
    br.Close()
    Response.Close( )


Working...