How do you send a Connection: Close header?
We have a .Net application that runs on a server. It has a reference to a
..Net web service.
We want to force the connection to close because the web service is behind a
load balancer as there are multiple boxes processing this service. Because
my “client†is really an application server that takes requests from 100s of
users we don’t want the automatic reuse of the HTTP connection.
We have tried the following:
System.Net.Http WebRequest request =
(System.Net.Htt pWebRequest)bas e.GetWebRequest (uri);
request.KeepAli ve = false;
That removes the Connection: Keep-Alive header, but does not cause the
connection to be closed.
System.Net.Http WebRequest request =
(System.Net.Htt pWebRequest)bas e.GetWebRequest (uri);
request.Connect ion = “Closeâ€;
This throws an exception, it appears you can’t really set this.
We have also tried using a unique ConnectionGroup Name for each call, no help.
Any help would be greatly appreciated.
Thanks
Chad
We have a .Net application that runs on a server. It has a reference to a
..Net web service.
We want to force the connection to close because the web service is behind a
load balancer as there are multiple boxes processing this service. Because
my “client†is really an application server that takes requests from 100s of
users we don’t want the automatic reuse of the HTTP connection.
We have tried the following:
System.Net.Http WebRequest request =
(System.Net.Htt pWebRequest)bas e.GetWebRequest (uri);
request.KeepAli ve = false;
That removes the Connection: Keep-Alive header, but does not cause the
connection to be closed.
System.Net.Http WebRequest request =
(System.Net.Htt pWebRequest)bas e.GetWebRequest (uri);
request.Connect ion = “Closeâ€;
This throws an exception, it appears you can’t really set this.
We have also tried using a unique ConnectionGroup Name for each call, no help.
Any help would be greatly appreciated.
Thanks
Chad
Comment