When I set QueryParameters.MaxFeatures then execute ServiceFeatureTable.QueryFeaturesAsync(QueryParameters parameters, QueryFeatureFields queryFeatureFields) then will catch a exception(Unable to complete operation.), but don't set it codes go well，I wonder if there is something to with the query when executed?
I've seen this issue as well and it seems related to the backend system that is being used.
For example, the code worked when using on ArcGIS Online services, but when hitting client ArcGIS Server feature services, the error would occur. Same data, same code, different environments.
Only difference I tracked as that the backend system of the client was Oracle. Ended up having to just remove those parameters, but surely would be nice to figure out the issue.
The client services I access are private which is why I didn't purse it any further since I don't have data to share which can reproduce the issue.
For your service "SupportPagination" option needs to be true to execute the query successfully with the QueryParameters.MaxFeatures property. You could try to execute the same query with your service from the REST End point including the "Result Record Count" option. Since the pagination is false for your service, you will receive the error, "Pagination isn't supported".
Here is the article for the pagination and REST API property
ArcGIS REST API - Services and Data Types --> resultRecordCount
Hope that helps.
I believe so, though I haven't tested any service that has "SupportPagination: false". According tot he REST API documentation, to get the result back from the two options, "resultOffset" and "resultrecordCount", pagination must be true.
Please look at thread below for further information about Pagination in case you need
"underlying database determines whether pagination is supported. There isn't an advanced configuration setting that can be "enabled" to allow pagination. FileGDB is not supported at 10.3 but could be supported at a later release. Certain versions of enterprise geodatabases support pagination at 10.3."
Hope that helps.
I just wanted to confirm that I tested with one of the service that has the "SupportPagination:false" and when I set the QueryParameters.Maxfeatures value it throws an exception. So to use the "MaxFeatures" in Runtime, you have to have the "SupportPagination" functionality of the service. Thanks