Home All Groups Group Topic Archive Search About

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



Author
14 Mar 2005 1:46 AM
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

Author
14 Mar 2005 2:25 PM
Curt_C [MVP]
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


Show quote
"Zam" <z**@parks.lv> wrote in message
news:OIeQweDKFHA.1280@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
>
>
Author
14 Mar 2005 6:09 PM
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?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


Show quote
"Zam" <z**@parks.lv> wrote in message
news:OIeQweDKFHA.1280@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
>
>

AddThis Social Bookmark Button