G
Guest
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a
webserver. This is working fine if the post rate is one post for every 20
seconds. But if the post rate is increased to one post for every 10 seconds
the client start getting error 403 'forbidden' from the webserver after a
short period of time. The webserver is IIS. The choking of the client/server
communication when doing high frequency posting is due to that we create a
new HttpWebRequest object for each post. We have tried to reuse the
HttpWebRequest object but with no success. Only if using 'HTTP Get' are we
able to resue the HttpWebRequest object and able to 'Get' one document per
second. But also for 'Http Get' we observe the same behavior with the
client/server communication choking when creating a new HttpWebRequest object
for each 'HTTP Get'. I.e. the 'HTTP Get' behavior led us to belive that it is
the recreation of a HttpWebRequest object for each request/post that is the
problem.
We need a way to reuse the HttpWebRequest object for 'HTTP Post' or a more
light weight creation of the HttpWebRequest objects so that the client is
able to post one document per seconds for an extensive period of time.
Is this a know problem?
What is the best practice to do high frequency HTTP Post's using C# and IIS?
regards, /jansenh
webserver. This is working fine if the post rate is one post for every 20
seconds. But if the post rate is increased to one post for every 10 seconds
the client start getting error 403 'forbidden' from the webserver after a
short period of time. The webserver is IIS. The choking of the client/server
communication when doing high frequency posting is due to that we create a
new HttpWebRequest object for each post. We have tried to reuse the
HttpWebRequest object but with no success. Only if using 'HTTP Get' are we
able to resue the HttpWebRequest object and able to 'Get' one document per
second. But also for 'Http Get' we observe the same behavior with the
client/server communication choking when creating a new HttpWebRequest object
for each 'HTTP Get'. I.e. the 'HTTP Get' behavior led us to belive that it is
the recreation of a HttpWebRequest object for each request/post that is the
problem.
We need a way to reuse the HttpWebRequest object for 'HTTP Post' or a more
light weight creation of the HttpWebRequest objects so that the client is
able to post one document per seconds for an extensive period of time.
Is this a know problem?
What is the best practice to do high frequency HTTP Post's using C# and IIS?
regards, /jansenh