Popup Request Hanging Main Window

  • Thread starter Thread starter PJ
  • Start date Start date
P

PJ

I want the user to have the capability to continue browsing the site as they
are recieving a file attachment from a popup window, but any requests just
hang on the browser until the file download is complete. What gives? Can
only one request be processed at the same time from a session? Other
clients, even other browser windows on the same computer do not experience
issues with hanging requests. I appreciate it if someone could help point
me in the right direction to solve this problem.

TIA~ PJ
 
Hi,

Can you tell in more details how you send the file? I’m sending Zip
files from the server to the client and I don’t get this behavior. I set
the buffer to off and I'm sending chunks of the file to the client.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Hi Natty~ Here is the code I use to send out the request. I chunk it out
as well. Sorry, it's in vb.net, forced to program w/ this god awful syntax
right now. CHUNK_SIZE is 16384. thx~ PJ

Dim br As New BinaryReader(fs)
Dim offset As Long
Response.Clear()
Response.BufferOutput = False
Response.Buffer = False
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=" +
fileName)
Response.AddHeader("Content-Length", fs.Length.ToString())
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.IsClientConnected Then
Exit Do
End If
Response.BinaryWrite(br.ReadBytes(Convert.ToInt32(size)))
fs.Flush()
Response.Flush()
offset += size
Loop Until offset >= totalSize
fs.Close()
br.Close()
Response.Close()
 
Hi,

The code looks fine. is the popup window Modal or Modeless?

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
Back
Top