HttpWebRequest timeout on alpha
Hi,
I am using the C# method below to get JSON data from a Jboss Application server
Method is used in Eikon WebApp under file WebCAllableFunctions.cs
public string GetEsJson(string query, string body, IAppServerServices services)
{
string json = null;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(body);
request.Timeout = 600000;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();
response.Close();
HttpStatusCode statusCode = response.StatusCode;
if (HttpStatusCode.OK.Equals(statusCode))
{
using (responseStream)
{
StreamReader reader = new StreamReader(responseStream, Encoding.UTF8);
json = reader.ReadToEnd();
}
}
}
catch (WebException ex)
{
System.Diagnostics.Debug.WriteLine(ex);
}
return json;
}
The above HttpWebRequest is timing out on Alpha, the same request is working fine locally
I tried to increase the timeout (request.Timeout = 600000) but it doesn't seem to have any impact, the request is always timing out after 40 seconds
Any help appreciated
Thanks