HTTP 403.9 - Access Forbidden: Too many users are connected

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i use WebRequest to read response from the URL i request.

the HTML returned contain an HTML buttons which do post back to server,

after many time "HTTP 403.9 - Access Forbidden: Too many users are connected".

this is snapshot of the code:


System.Net.WebRequest request =
System.Net.HttpWebRequest.Create("http://192.168.0.12:8888/XXXX");

request.ContentType = @"application/x-www-form-urlencoded";
request.Credentials =
System.Net.CredentialCache.DefaultCredentials;

System.Text.StringBuilder ActionsBuilder = new
StringBuilder();

request.Method = "POST";

System.Net.ServicePointManager.Expect100Continue = false;
((System.Net.HttpWebRequest)request).KeepAlive = false;

byte[] postBuffer =
System.Text.Encoding.GetEncoding(1252).GetBytes(Parameters);

request.ContentLength = postBuffer.Length;

System.IO.Stream postDataStream = request.GetRequestStream();
postDataStream.Write(postBuffer, 0, postBuffer.Length);
postDataStream.Close();

System.Net.HttpWebResponse response =
(System.Net.HttpWebResponse)request.GetResponse();

Encoding enc = System.Text.Encoding.UTF8;

System.IO.StreamReader responseStream = new
System.IO.StreamReader(response.GetResponseStream(), enc, false);

StringBuilder responseHtml = new StringBuilder();

responseHtml.Append(responseStream.ReadToEnd());
response.Close();
responseStream.Close();
request.Abort();


please advise
 
the error means too many open connections. this will happen if the
client closes the tcp pipe before sending a fin.

why are you calling abort? I'd think Response.End() (which closes
connections before exiting is better).

-- bruce (sqlwork.com)
 
i use WebRequest to read response from the URL i request.

the HTML returned contain an HTML buttons which do post back to server,

after many time "HTTP 403.9 - Access Forbidden: Too many users are connected".

this is snapshot of the code:

System.Net.WebRequest request =
System.Net.HttpWebRequest.Create("http://192.168.0.12:8888/XXXX");

request.ContentType = @"application/x-www-form-urlencoded";
request.Credentials =
System.Net.CredentialCache.DefaultCredentials;

System.Text.StringBuilder ActionsBuilder = new
StringBuilder();

request.Method = "POST";

System.Net.ServicePointManager.Expect100Continue = false;
((System.Net.HttpWebRequest)request).KeepAlive = false;

byte[] postBuffer =
System.Text.Encoding.GetEncoding(1252).GetBytes(Parameters);

request.ContentLength = postBuffer.Length;

System.IO.Stream postDataStream = request.GetRequestStream();
postDataStream.Write(postBuffer, 0, postBuffer.Length);
postDataStream.Close();

System.Net.HttpWebResponse response =
(System.Net.HttpWebResponse)request.GetResponse();

Encoding enc = System.Text.Encoding.UTF8;

System.IO.StreamReader responseStream = new
System.IO.StreamReader(response.GetResponseStream(), enc, false);

StringBuilder responseHtml = new StringBuilder();

responseHtml.Append(responseStream.ReadToEnd());
response.Close();
responseStream.Close();
request.Abort();

please advise

Ignore Bruce, he's wrong :)

Your server is running XP Pro? It supports a maximum of about 10
connections. You'll need to use Windows Server 2003 to accommodate
more.
 
The non-server MS OSes only support 10 simultaneous connections. That
doesn't mean 10 seperate browsers or other items, it only means 10 items
connecting to the machine. Sometimes one single operation can use a number
of connections without you knowing it and thus the error.
 
Invest in Windows Vista for your web development. Not limited to 10
connections, can use multiple IP Addresses and root websites.
Peter
 
Dear kierenj,

is there any solution about this issue at windows xp Pro?
i need to test what am doing before added to the project?



thank you
-----------------
Ahmad Zeitoun




i use WebRequest to read response from the URL i request.

the HTML returned contain an HTML buttons which do post back to server,

after many time "HTTP 403.9 - Access Forbidden: Too many users are connected".

this is snapshot of the code:

System.Net.WebRequest request =
System.Net.HttpWebRequest.Create("http://192.168.0.12:8888/XXXX");

request.ContentType = @"application/x-www-form-urlencoded";
request.Credentials =
System.Net.CredentialCache.DefaultCredentials;

System.Text.StringBuilder ActionsBuilder = new
StringBuilder();

request.Method = "POST";

System.Net.ServicePointManager.Expect100Continue = false;
((System.Net.HttpWebRequest)request).KeepAlive = false;

byte[] postBuffer =
System.Text.Encoding.GetEncoding(1252).GetBytes(Parameters);

request.ContentLength = postBuffer.Length;

System.IO.Stream postDataStream = request.GetRequestStream();
postDataStream.Write(postBuffer, 0, postBuffer.Length);
postDataStream.Close();

System.Net.HttpWebResponse response =
(System.Net.HttpWebResponse)request.GetResponse();

Encoding enc = System.Text.Encoding.UTF8;

System.IO.StreamReader responseStream = new
System.IO.StreamReader(response.GetResponseStream(), enc, false);

StringBuilder responseHtml = new StringBuilder();

responseHtml.Append(responseStream.ReadToEnd());
response.Close();
responseStream.Close();
request.Abort();

please advise

Ignore Bruce, he's wrong :)

Your server is running XP Pro? It supports a maximum of about 10
connections. You'll need to use Windows Server 2003 to accommodate
more.
 
Back
Top