Select to view content in your preferred language

Feature Layer 'Where' property

739
3
06-18-2010 02:58 PM
CurtThue
Deactivated User
I have a feature layer that I set the Where property to criteria similar to this:

myFeatureLayer.Where = "FieldName IN ('value1', 'value2', 'value3')";

This worked until I decided to scale it up. If there are 100 values in the criteria it works fine, but once I exceed 100 then IE 8 raises an error (copied below).

In FireFox 3.0.4 it appears fine, also the same value set to a Query Task Where property works.

IE8 error:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Fri, 18 Jun 2010 22:48:50 UTC


Message: Unhandled Error in Silverlight Application    at System.Net.Browser.AsyncHelper.BeginOnUI(BeginMethod beginMethod, AsyncCallback callback, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state)
   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream, CompletionDelegate completionDelegate, AsyncOperation asyncOp)
   at System.Net.WebClient.<>c__DisplayClass1.<UploadDownloadBits>b__0(Byte[] returnBytes, Exception exception, AsyncOperation asyncOp2)
   at System.Net.WebClient.UploadBitsRequestCallback(IAsyncResult result)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass9.<InvokeGetRequestStreamCallback>b__7(Object state2)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Line: 1
Char: 1
Code: 0
URI: http://localhost:1159/BondProjectWrapper2.aspx
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
Looks like you run into an IE limitation : the Url lenght must be less than 2083.

The Firefox limit is much higher and the Query Task works because the request is automatically forced to POST when the Url is too long.
0 Kudos
JackCibor
Frequent Contributor
So what is the work around??? Is there one?
0 Kudos
DominiqueBroux
Esri Frequent Contributor

So what is the work around??? Is there one?

The 2.1 version has no more this limitation. So the workaround is either not to use IE, or to use ArcGIS SL 2.1.
0 Kudos