I am using Log Me In Rescue API to pull some reports from their web service (consumed as a web reference via Visual Studio 2010).
the report works.
However, when I try to run another report it gives me a:
getReport_PollRateExceeded
I spoke to Log Me In Rescue tech support staff, and they stated this is not an issue with their API, it’s an issue with the code that i’m using. They had no limits on the number of reports you could pull from the server (they even allow you to do it real time).
I am querying their server only once ever 30 or so seconds, so i can’t possibly be going over any set limit in .NET that i can think off.
The web service API can be found here:
https://secure.logmeinrescue.com/API/API.asmx
Their Wiki is here:
http://logmeinwiki.com/wiki/Rescue:API
The code i’m using is:
private void myReport_DoWork(object sender, DoWorkEventArgs e)
{
LMIR.getReportRet response = new LMIR.getReportRet();
while (response.ToString() != "getReport_OK")
{
response = proxy.getReport(iTechID, NODE_REF.NODE, sAuthCodes, out sReports);
}
}
I do not call that worker process again, until the user REQUESTS it, i even disable the request button in favor of a progress bar, waiting for the runworkercompleted() routine to finish.
But, sure enough, if i request within that 30 second limit, i receive the pollRateExceeded.
So i’m a b it confused.
Is this something that can be fixed in the app.config file?
I have since created a short program:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Net;
using System.Web;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using testLMIR.LMIR;
using System.Collections;
using System.Text.RegularExpressions;
namespace testLMIR
{
public partial class Form1 : Form
{
string sUser = "";
string sPass = "";
int iNodeID = 74249;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
LMIR.API proxy = new LMIR.API();
proxy.CookieContainer = new CookieContainer();
sUser = textBox1.Text.ToString();
sPass = textBox2.Text.ToString();
loginRet oLogin = proxy.login(sUser, sPass);
Console.WriteLine(oLogin.ToString());
string sAuthCode = "";
requestAuthCodeRet oAuthCodeReq = proxy.requestAuthCode(sUser, sPass, out sAuthCode);
string sReport = "";
getReportRet oGetReport = proxy.getReport(iNodeID,NODE_REF.NODE, sAuthCode, out sReport);
Console.WriteLine(oGetReport + "<br />");
Thread.Sleep(10000);
oGetReport = proxy.getReport(iNodeID, NODE_REF.NODE, sAuthCode, out sReport);
Console.WriteLine(oGetReport + "<br />");
Thread.Sleep(10000);
oGetReport = proxy.getReport(iNodeID, NODE_REF.NODE, sAuthCode, out sReport);
Console.WriteLine(oGetReport + "<br />");
Thread.Sleep(10000);
}
}
}
This program will take the login from 2 text boxes on the form, and take action when the button is pressed. Here’s the results:
login_OK
getReport_OK<br />
getReport_PollRateExceeded<br />
getReport_PollRateExceeded<br />
If i’m reading this information correctly, i can see that even 30 seconds later, i still couldn’t pull the report.
I highly doubt this is a limitation of the program, no?
According to the LMIR engineering team, the pollrateexceeded does indeed exist; you cannot request more than 1 piece of information in a 60 second period; only PinCodes will work with that. Anything else is 1 request per minute. No way around that, at this time.