Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have code from a custom web service using the 9.3 ESRI ArcGIS ADF code to do a spatial query against an ArcGIS Server mapservice. But ESRI changed the ADF library so much that I can't figure out how they want us to do it in 10.1. Does anyone here know how to do the following code in 10.1? The ESRI.ArcGIS.ADF library doesn't have the ArcGISServer library any more. Where did it go and how does ESRI want us to do it now?

        endpoint = ServerURL + MapServiceName + GlobalFunctions.cMapServer;

        //Create MapService
        ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy pmapServer = new ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy(endpoint);
        ESRI.ArcGIS.ADF.ArcGISServer.MapServerInfo mapinfo = pmapServer.GetServerInfo(pmapServer.GetDefaultMapName());
        ESRI.ArcGIS.ADF.ArcGISServer.MapLayerInfo[] plyrDesc = mapinfo.MapLayerInfos;
        int lyrIndex = 0;
       //Check the layer at which the FeatureClass lies
        for (; lyrIndex < plyrDesc.Length; lyrIndex++)
            if (plyrDesc[lyrIndex].Name.ToUpper().Equals(FeatureClass))
        //Create an array of field names in the feature class.
        ESRI.ArcGIS.ADF.ArcGISServer.Fields flds = plyrDesc[lyrIndex].Fields;
        ESRI.ArcGIS.ADF.ArcGISServer.Field[] fldArray = flds.FieldArray;
        int geomfldIndex = 0;
        for (; geomfldIndex < fldArray.Length; geomfldIndex++)
            if (fldArray[geomfldIndex].Type == ESRI.ArcGIS.ADF.ArcGISServer.esriFieldType.esriFieldTypeGeometry)
share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.