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

Discussion in 'ASP General' started by Zam, Mar 14, 2005.

  1. Zam

    Zam Guest

    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
    Zam, Mar 14, 2005
    #1
    1. Advertising

  2. Zam

    Mark Schupp Guest

    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" <> wrote in message
    news:...
    > 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
    >
    >
    Mark Schupp, Mar 14, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. neverstill

    resizing image has terrible quality

    neverstill, Dec 17, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    475
    neverstill
    Dec 17, 2003
  2. Dannie Juge

    TERRIBLE BUG IN ASP SERVER!!!

    Dannie Juge, Dec 19, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    2,890
    Guest
    Dec 19, 2003
  3. Miguel Dias Moura
    Replies:
    4
    Views:
    444
    Hans Kesting
    May 6, 2004
  4. =?Utf-8?B?xZ5lbm9sIEFrYnVsYWs=?=

    Designing on VS.2003 is terrible

    =?Utf-8?B?xZ5lbm9sIEFrYnVsYWs=?=, Mar 18, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    404
    Mythran
    Mar 18, 2005
  5. Michael Bacarella
    Replies:
    26
    Views:
    1,321
    harri
    Nov 20, 2007
Loading...

Share This Page