473,386 Members | 1,745 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,386 software developers and data experts.

MaxConnections

I've written an HTTPHandler that implements IHttpAsyncHandler. This handler
makes a call to a webservice that will send back a byte[] to be sent back to
the webrowser as an image.

I've set the maxconnections setting on the web.config for the handler and
the webservice to:

<system.net>
<connectionManagement>
<add address="*" maxconnection="20"/>
</connectionManagement>
</system.net>

But when debugging I can see that it is still only making 2 requests at a
time. How can I make a handler that will allow for more than 2 requests at
a time.

TIA


May 14 '07 #1
4 3313
Someone correct me if I'm wrong, but there is a limit at the TCP/IP layer
that means you can only have two TCP/IP connections to the same machine on
the same port at a time. Point IE at a graphic-heavy site and you'll see it
downloads images 2 at a time. As this limit is at the TCP/IP layer you
can't control it from IIS or ASP.

"MattC" <m@m.comwrote in message
news:e3**************@TK2MSFTNGP03.phx.gbl...
I've written an HTTPHandler that implements IHttpAsyncHandler. This
handler makes a call to a webservice that will send back a byte[] to be
sent back to the webrowser as an image.

I've set the maxconnections setting on the web.config for the handler and
the webservice to:

<system.net>
<connectionManagement>
<add address="*" maxconnection="20"/>
</connectionManagement>
</system.net>

But when debugging I can see that it is still only making 2 requests at a
time. How can I make a handler that will allow for more than 2 requests
at a time.

TIA


May 14 '07 #2
Windows Server 2003 SP1 removed the need to set a higher limit for maxconnections.

The number of simultaneous connections in W2K3 SP1 is now limited
only by available system resources or the MaxConnections registry entry.

You *can* set a higher number of connections in an unpatched Windows Server 2003:

Registry path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\HTTP\Parameters

Registry entry
MaxConnections

Value Type
DWORD

Valid data value ranges for this entry are 0 to 4294967295.

Matt, you seem to have a typo :

<add address="*" maxconnection="20"/>

That should be :
<add address="*" maxconnections="20"/>

In any case, if you're running an unpatched W2K3, try setting the registry entry, per the above.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Aidy" <ai**@noemail.xxxa.comwrote in message news:tO******************************@bt.com...
Someone correct me if I'm wrong, but there is a limit at the TCP/IP layer that means you can only
have two TCP/IP connections to the same machine on the same port at a time. Point IE at a
graphic-heavy site and you'll see it downloads images 2 at a time. As this limit is at the TCP/IP
layer you can't control it from IIS or ASP.
"MattC" <m@m.comwrote in message news:e3**************@TK2MSFTNGP03.phx.gbl...
>I've written an HTTPHandler that implements IHttpAsyncHandler. This handler makes a call to a
webservice that will send back a byte[] to be sent back to the webrowser as an image.

I've set the maxconnections setting on the web.config for the handler and the webservice to:

<system.net>
<connectionManagement>
<add address="*" maxconnection="20"/>
</connectionManagement>
</system.net>
>But when debugging I can see that it is still only making 2 requests at a time. How can I make a
handler that will allow for more than 2 requests at a time.

TIA

May 14 '07 #3
Juan,

Thanks but the limit is impossed by the web browsers request queue in this
case. So IE only ever makes 2 concurrent requests and will block until each
requests returns before sending the next.

I did find that altering:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings\MaxConnectionsPerServer

and setting to 20 odd really helps, but that isn't somethign I can tell
users to do :s

Also I'm using .NET2.0 so the system.net entry is maxconnection, it
complains of unknown attribute with maxconnectionS.

regards

Matt
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eH**************@TK2MSFTNGP04.phx.gbl...
Windows Server 2003 SP1 removed the need to set a higher limit for
maxconnections.

The number of simultaneous connections in W2K3 SP1 is now limited
only by available system resources or the MaxConnections registry entry.

You *can* set a higher number of connections in an unpatched Windows
Server 2003:

Registry path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\HTTP\Parameters

Registry entry
MaxConnections

Value Type
DWORD

Valid data value ranges for this entry are 0 to 4294967295.

Matt, you seem to have a typo :

<add address="*" maxconnection="20"/>

That should be :
<add address="*" maxconnections="20"/>

In any case, if you're running an unpatched W2K3, try setting the registry
entry, per the above.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:tO******************************@bt.com...
>Someone correct me if I'm wrong, but there is a limit at the TCP/IP layer
that means you can only
have two TCP/IP connections to the same machine on the same port at a
time. Point IE at a
graphic-heavy site and you'll see it downloads images 2 at a time. As
this limit is at the TCP/IP
layer you can't control it from IIS or ASP.

>"MattC" <m@m.comwrote in message
news:e3**************@TK2MSFTNGP03.phx.gbl...
>>I've written an HTTPHandler that implements IHttpAsyncHandler. This
handler makes a call to a
webservice that will send back a byte[] to be sent back to the webrowser
as an image.

I've set the maxconnections setting on the web.config for the handler
and the webservice to:

<system.net>
<connectionManagement>
<add address="*" maxconnection="20"/>
</connectionManagement>
</system.net>
>>But when debugging I can see that it is still only making 2 requests at
a time. How can I make a
handler that will allow for more than 2 requests at a time.

TIA


May 14 '07 #4
If I am undestanding correctly, you are talking about client connections,
and not server connections?

If so, this is an IE thing and can be altered only through the registry with
the Internet Settings\MaxConnectionsPerServer key.

I see Juan has jumped in as well. If it is server side, and you are using
Windows Server 2003, I would go there first.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
"MattC" <m@m.comwrote in message
news:e3**************@TK2MSFTNGP03.phx.gbl...
I've written an HTTPHandler that implements IHttpAsyncHandler. This
handler makes a call to a webservice that will send back a byte[] to be
sent back to the webrowser as an image.

I've set the maxconnections setting on the web.config for the handler and
the webservice to:

<system.net>
<connectionManagement>
<add address="*" maxconnection="20"/>
</connectionManagement>
</system.net>

But when debugging I can see that it is still only making 2 requests at a
time. How can I make a handler that will allow for more than 2 requests
at a time.

TIA

May 14 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tom Willis | last post by:
How are the expert pythoneers dealing with config files? Is there anything similair to .net's config files or java's .properties? A quick search on google didn't return anything that looked...
0
by: Evrim Ozcelik | last post by:
Hi, My zope server is running on fedore core3. I want to connect to ms sql server running on windows xp platform using FreeTDS, SQLRelay and ZSqlRelayDA. My sqlrelay.conf can be seen below: ...
0
by: Al Caponi | last post by:
Hi all, There is a limitation on Win98 when a client app using mm.mysql driver doing extensive queries to MySQL 3.23.x frequently encounters a connection lost error. Error msg is something...
2
by: Fork | last post by:
Hi, I am trying to execute a script from the command line as follows; c:\program files\mysql\bin>mysql -u root newsman < servers3.mysql But this gives me the following error; ERROR 1064...
0
by: Edward Diener | last post by:
After calling mySocket.Bind(someEndpoint) to an IP endpoint I immediately attempt to get the MaxConnections allowed through...
0
by: John Knaack | last post by:
I'm currently having problems setting up the max concurrent user allowed to a server with a web service. I have a asmx file that basically makes sql calls to a database and generates a XML file and...
4
by: Ole | last post by:
As a newbie to socket communication I would like to know more about 'SocketOptionName.MaxConnections'. Everywhere I look for examples on using socket I see the statement:...
3
by: diwakar09 | last post by:
Hi I am very new to python,In case of using multithreading i want to synchronize all the threads but using sem = BoundedSemaphore statement i am getting this error. even i have imported the...
7
by: Eric Wertman | last post by:
I have a set of files with this kind of content (it's dumped from WebSphere): ]
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.