Why does table.QueryAsync hardly ever work?

2101
5
01-20-2016 12:03 PM
MattMiley
Occasional Contributor

Here's my code:

  var table = await ServiceFeatureTable.OpenAsync(new Uri(AGOL_URL_Class.GetURL() + LayerID), null, null);

            table.Where = Where;

            table.OutFields = Fields;

var selected = await table.QueryAsync(Current_OBJECTID);     

Its just like all the samples and it gets stuck almost all the time at QueryAsync

It just turns null after 60 sections then the code continues.

0 Kudos
5 Replies
ArneDahlman
New Contributor III

Could it be a timeout?

Check request with fiddler.

/Arne

0 Kudos
AnttiKajanus1
Regular Contributor II

Hi,

Can you provide more information on this case since this shouldn't not happen. If you can create a simple reproducer and attach to the thread, I'll give a look for it and see what's going on.

0 Kudos
MattMiley
Occasional Contributor

I had some other layers querying at the same time, that's what was messing it up. It loads fine by itself but with other traffic going on it doesn't work.

0 Kudos
AnttiKajanus1
Regular Contributor II

Hi Matt,

I would a bit more information to be able to comment. Doing multiple queries from several layers shouldn't affect the query results.

0 Kudos
MattMiley
Occasional Contributor

I'll email the sample project to you, it has secured layers in it. I was wrong about it not working while loading other layers, it just doesn't work sometimes. its super annoying!!!

0 Kudos