Select to view content in your preferred language

Problem with geoprocessing task calling geometry server

740
2
09-28-2010 06:06 AM
PaulHuppé
Deactivated User
Hi,

I am trying to convert UTM coordinates in zone 13 to lat/long using a geometry service.  I followed the sample I found in the Silverlight samples web site, but I am getting the following exception when executing:

"Exception Details: System.Web.HttpException: No Content"

And Here is the Stack trace:

[HttpException (0x80004005): No Content]
   ESRI.ArcGIS.WebServices.BaseServiceHandler.ReadStringRequest(HttpRequest request) +105
   ESRI.ArcGIS.WebServices.CatalogHandler.HandleRequest(HttpContext context) +28
   ESRI.ArcGIS.WebServices.CatalogHandler.QueryService(HttpContext ctx) +45

Here is the request that got sent (NOTE: I have replaced the server name):

http://myserver.the.domain/ArcGIS/services/Geometry/GeometryServer/project?inSR=26913&outSR=4617&geometries=555776%2c6651833&f=json&


Here is the code that generated the request (NOTE: I have replaced the server name):

            geometryService = new GeometryService("http://myserver.the.domain/ArcGIS/services/Geometry/GeometryServer");
            geometryService.ProjectCompleted += geometryService_ProjectCompleted;
            geometryService.Failed += geometryService_Failed;
            double x = double.NaN;
            double y = double.NaN;
            double.TryParse(tbUlEasting.Text, out x);
            double.TryParse(tbUlNorthing.Text, out y);
            if (double.IsNaN(x) || double.IsNaN(y))
            {
                MessageBox.Show("Enter valid UL coordinate values");
                return;
            }
            MapPoint ulPoint = new MapPoint(x, y, new SpatialReference(26913));
            geometryService.ProjectAsync(new List<Graphic> { new Graphic() { Geometry = ulPoint } }, Map.SpatialReference, ulPoint);


Can anyone help?

Thanks,
Paul
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
Likely because the Url of your geometry server is not right.
The 'rest' part is missing.

Should be http://myserver.the.domain/ArcGIS/rest/services/Geometry/GeometryServer

The same request on arcgis online is working well:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?inSR=2691...&
0 Kudos
PaulHuppé
Deactivated User
Thanks Dominique,

That was too simple!!  No wonder I did not see it.

Cheers,
Paul
0 Kudos