473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1383
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
1
by: P Cooper | last post by:
(Posted in multiple groups...Apologies) Why does the error below occur whenever the statement Request.BinaryRead(Request.TotalBytes) is executed for uploads larger than 100K? I thought the 100K...
30
by: DFS | last post by:
I hadn't ever used it until a couple months ago, but it seems to be a handy little switch. On some .mdbs it doesn't change the size, or actually increases it a little. But on others it cut the...
10
by: RedEagle | last post by:
Hi All! Do you remember me? I am that desperate who had this error for a while: --- Compilation Error Description: An error occurred during the compilation of a resource required to service...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
1
by: Jeff | last post by:
hey asp.net 2.0 The line "e.Item.Parent.ChildItems.Remove(e.Item);" gives this error: 'e.Item' threw an exception of type 'System.NullReferenceException' System.Web.UI.WebControls.MenuItem...
5
by: Christian Stapfer | last post by:
After switching from Python 2.3 to 2.4 (Enought), PIL throws an exception that did not occur formerly (under Python 2.3) when executing ImageFont.truetype(font, size) where font =...
4
by: Jeff | last post by:
Hey asp.net 2.0 I have a UserControl which contain many TextBoxes. When I from the webpage (the webpage containing this UserControl) click on a button to start save the text in the textBoxes,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.