Working with ESRI ArcGIS Server can sometimes be puzzling with unexpected outcomes and issues that are not reproducible. After many months of working with the software, you can begin to understand the oddities and can know when to expect correct results and when something might give you bogus answers.
Well, this time it wasn't the software. It was the data; the second most likely suspect. Turns out that doing a spatial query with the Salt Lake County boundary on one particular layer of data would return null. Every other layer was fine and this problem layer worked for all the other counties and query methods. A null datatable when using the web ADF is a sure sign of a problem. But what could that problem be?
Upon further investigation and using a polygon search tool, I was able to narrow down the area of where this issue was happening. I then narrowed it down to one cluster of points. Opening ArcMap and identifying one of those points, I noticed some unknown characters being displayed as hollow boxes. How did that get there? Who knows, but ArcMap has the ability to strip those characters and move on with life. The webADF however breaks and returns null.