Select to view content in your preferred language

"no http answer" error when running geometry service

831
2
12-20-2012 05:11 PM
Labels (1)
haowoo
by
Emerging Contributor
I want to union all the features in the layer, but when running geometryService.UnionAsync, it causes an error "no http answer", I tried other services such as AreasAndLengthsAsync of the GeometryService but causes the same error. My codes are paste below, anyone can give me any suggestions? Thanks.


 LocalGeometryService.GetServiceAsync(localGeometryService =>
            {
                // Create a new GeometryService task instance.
                geometryTask = new GeometryService();

                // Set the Url property to the Url of the LocalGeometryService.
                geometryTask.Url = localGeometryService.UrlGeometryService;

                // Register event handlers for the BufferCompleted and Failed events.
                geometryTask.UnionCompleted += GeometryService_UnionCompleted;
                geometryTask.Failed += GeometryService_Failed;
            });

//after query and got all the features
void QueryTask_ExecuteCompleted(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args)
        {
            FeatureSet featureSet = args.FeatureSet;

            selectedGraphics = featureSet.Features as List<Graphic>;
           //start union
           geometryTask.UnionAsync(selectedGraphics);
         }
0 Kudos
2 Replies
RichardWatson
Deactivated User
See if HTTP is enabled under security for ArcGIS Server.

I believe that the options are HTTP, HTTPS, plus HTTP and HTTPS.

If this is the problem then there is probably some way to tell the API to use HTTPS.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Does the Union sample in the sample application work? (Geometry > Geometry Operations > Union).


Cheers

Mike
0 Kudos