one thing solved, but other terrible thing occur...

Z

Zam

Hello World,

Windows 2000 Server. IIS 5.0

Previous message/issue was: "sending HUGE file to client via
Response.BinaryWrite"
It's solved now. But now I have other unsolved and terrible thing:

This code are send to client some file:

<%
Dim VPath, Path, MyStream, MyFile, MyFSO

Server.ScriptTimeout = 3600

VPath = Request.QueryString

Path = Server.MapPath ("../../" & VPath)

Set MyFSO = CreateObject ("Scripting.FileSystemObject")
Set MyFile = MyFSO.GetFile (Path)

If Err.number = 0 then

If Response.IsClientConnected Then

Set MyStream = MyFile.OpenAsTextStream (1, -1) '### open as Unicode

With Response
.Buffer = True
.ContentType = "application/binary"
.AddHeader "Content-Disposition","attachment;filename=" & MyFile.name
.Flush
End With

Do
Response.BinaryWrite MyStream.Read (1024000 / 2)
Response.Flush
If Not Response.IsClientConnected Then
Exit Do
End If
Loop until MyStream.AtEndOfStream

MyStream.Close
Set MyStream = Nothing
End If
End if

Set MyFile = Nothing
Set MyFSO = Nothing
%>

Everything work fine, except one thing: while client (Client #1) accepting
file, no one else (Client #2...#N) cannot access web site.... Web browser is
trying to open page without result (result always the same: cannot
connect/display...).



Only when file sending to client (Client #1) done, IIS start pay attention
to other clients (Client #2...#N).



The same happen, if client choose no action (do nothing) with open "Save
as..." dialog window... all other clients are not handled more by web
server...



How come? What to see and what should I check to fix this?



P.S. All happen under the same one domain/subdomain.

I don't wont to create unlimited domains/subdomain for each client...


With best regards,
 
M

Mark Schupp

These are different clients on different machines?
Are the other clients trying to download the same file?
Have you tried smaller values in the Read() method?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top