Hi
I encountered an annoying problem when operate a C# code for football market, the code works fine when I opened it, but after around 10 hours, the listcurrentorder this class start having problem and the APING exception give me INVALID_SESSION_INFOMRATION and no error details, one of requestUUID is prdang007-08121049-000bb9d859. There is no problem with other class for football, like listmarketbook or listMarketCatalogue. I run keepalive for every 15 minutes and everytime the status is OK.Could someone help me solve this problem please, this has been occuring for months.
below is my keepalive code
protected bool KeepAlive(string ssoid, string appKey)
{
string url = " https://identitysso.betfair.com/api/keepAlive";
WebRequest request = null;
WebResponse response = null;
string strResponseStatus = "";
try
{
request = WebRequest.Create(new Uri(url));
request.Method = "POST";
request.ContentType = "application/json-rpc";
request.Headers.Add(HttpRequestHeader.AcceptCharse t, "ISO-8859-1,utf-8");
request.Headers.Add("X-Authentication", ssoid);
if (!string.IsNullOrEmpty(appKey))
{
request.Headers.Add("X-Application", appKey);
}
response = request.GetResponse();
strResponseStatus = "Status is " + ((HttpWebResponse)response).StatusDescription;
return true;
}
catch (Exception ex)
{
Log.Instance.WriteToFile("CreateRequest Error:" + ex.Message);
}
finally
{
if (response != null)
response.Close();
}
return false;
}
I encountered an annoying problem when operate a C# code for football market, the code works fine when I opened it, but after around 10 hours, the listcurrentorder this class start having problem and the APING exception give me INVALID_SESSION_INFOMRATION and no error details, one of requestUUID is prdang007-08121049-000bb9d859. There is no problem with other class for football, like listmarketbook or listMarketCatalogue. I run keepalive for every 15 minutes and everytime the status is OK.Could someone help me solve this problem please, this has been occuring for months.
below is my keepalive code
protected bool KeepAlive(string ssoid, string appKey)
{
string url = " https://identitysso.betfair.com/api/keepAlive";
WebRequest request = null;
WebResponse response = null;
string strResponseStatus = "";
try
{
request = WebRequest.Create(new Uri(url));
request.Method = "POST";
request.ContentType = "application/json-rpc";
request.Headers.Add(HttpRequestHeader.AcceptCharse t, "ISO-8859-1,utf-8");
request.Headers.Add("X-Authentication", ssoid);
if (!string.IsNullOrEmpty(appKey))
{
request.Headers.Add("X-Application", appKey);
}
response = request.GetResponse();
strResponseStatus = "Status is " + ((HttpWebResponse)response).StatusDescription;
return true;
}
catch (Exception ex)
{
Log.Instance.WriteToFile("CreateRequest Error:" + ex.Message);
}
finally
{
if (response != null)
response.Close();
}
return false;
}

