HTTP 403.9 - Access Forbidden: Too many users are connected

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
 
B

bruce barker

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)
 
K

kierenj

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.
 
M

Mark Fitzpatrick

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.
 
G

Guest

Invest in Windows Vista for your web development. Not limited to 10
connections, can use multiple IP Addresses and root websites.
Peter
 
G

Guest

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,007
Messages
2,570,267
Members
46,866
Latest member
Aletlirm

Latest Threads

Top