M
Mohan Nainar
Guest
HI,
I am using the below code for calling api (https) , some times i am getting Operation time out error . Any thoughts on this ?
I tried to increase the time out also but no luck.
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var webrequest = (HttpWebRequest)System.Net.WebRequest.Create(url);
webrequest.Credentials = new NetworkCredential("username", "password");
webrequest.Timeout = 50000;
using (var response = webrequest.GetResponse())
using (var reader = new StreamReader(response.GetResponseStream()))
{
}
Continue reading...
I am using the below code for calling api (https) , some times i am getting Operation time out error . Any thoughts on this ?
I tried to increase the time out also but no luck.
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var webrequest = (HttpWebRequest)System.Net.WebRequest.Create(url);
webrequest.Credentials = new NetworkCredential("username", "password");
webrequest.Timeout = 50000;
using (var response = webrequest.GetResponse())
using (var reader = new StreamReader(response.GetResponseStream()))
{
}
Continue reading...