Answer the question
In order to leave comments, you need to log in
25 c# requests are sent. How to fix?
while (true)
{
try
{
HttpWebRequest rq = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse rp = (HttpWebResponse)rq.GetResponse();
if ((int)rp.StatusCode == 200)
{
successConnections++;
Console.WriteLine("Соединение прошло. Успешных: {0} Ошибок: {1}", successConnections, errors);
}
}
catch (Exception e)
{
Console.WriteLine("Произошла ошибка с кодом: {0} \nИ со следующим сообщением: {1}", e.HResult, e.Message);
errors++;
}
Thread.Sleep(timeOut);
}
Answer the question
In order to leave comments, you need to log in
How to make that there would be no this timeout?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question