469,353 Members | 2,050 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,353 developers. It's quick & easy.

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

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,

--
Should you have any questions, please don't hesitate to contact me.
If you response to an email, please quote the complete message.
http://1click.lv
Jul 22 '05 #1
2 1308
you tested this in a server setup of IIS or a workstation one? Just
wondering if you might be hitting a connection count limitation.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Zam" <za*@parks.lv> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
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,

--
Should you have any questions, please don't hesitate to contact me.
If you response to an email, please quote the complete message.
http://1click.lv

Jul 22 '05 #2
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?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Zam" <za*@parks.lv> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
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,

--
Should you have any questions, please don't hesitate to contact me.
If you response to an email, please quote the complete message.
http://1click.lv

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by BlackHawke | last post: by
1 post views Thread by P Cooper | last post: by
6 posts views Thread by Jeff | last post: by
1 post views Thread by Jeff | last post: by
5 posts views Thread by Christian Stapfer | last post: by
4 posts views Thread by Jeff | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.