How do i keep a connection alive in C#? I\'m not doing it right. Am i suppose to create an HttpWebRequest obj and use it to go to any URLs i need? i dont see a way to visit
If you're using Http 1.1 you shouldn't be using Keep-Alive as the connection is implicitly Keep-Alive.
The HttpWebRequest.KeepAlive
property can be set but if you're sending an Http 1.1 request it will not actually set the header unless you set it to Close.
Here's another question that has more info: is an HTTP/1.1 request implicitly keep-alive by default?