.net - Am I able to reuse a HttpWebRequest? -


Am I able to reuse HttpWebRequest?

It seems that the third request for a site is caused due to the operation for time it seems that each request creates a new connection, so I want to know whether I change the URL and again I can reuse a HTTP webbrick by receiving the request. The code in question is below. This code checks if a limit of urls exists. Fixed Validation list (text worker sw, string urlTemplate, int start, int end) {for (int i = start; i & lt; end; i ++) {var url = String.Format (urlTemplate, i); Var Rake = (HTTPWebST) HTTPPUBLUBE REF. Crelet (url); {Req.Method = "HEAD"; TryHttpWebRequest {var resp = req.GetResponse (); Sw.WriteLine (i); } Hold (exception e) {}}} sw.flush (); }

If you call on your response then it should be OK. You are allowed only "open" connections, so the reason for this being unsuccessful is because it can not open a new connection.

Once done with the reaction, you have to close it. There is no need to reuse any thing.

From:

You have to stop the stream either. Close or HTTP Webbance. Turn off the feedback to stop and leave the connection to reuse. It is not necessary to close both streams. Close and HTTP Web Response Close, but doing so does not make any errors.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -