I have the geometry service in the proxy.config
<serverUrl url="http://xxxxxxx/rest/services/Utilities/Geometry/GeometryServer/"
matchAll="true"/>
I have the proxy setup in the config.json of the app:
"wabVersion": "2.8",
"isTemplateApp": true,
"isWebTier": false,
"httpProxy": {
"useProxy": true,
"alwaysUseProxy": false,
"url": "http://xxxxxx/DotNet/proxy.ashx",
"rules": []
},
However the geometryservice gives me the 500 error
geometryService.intersect(firstgraphics, secondgraphics[0], this.theoutput);
Error:
http://xxxx/DotNet/proxy.ashx?http://xxxx/rest/services/Utilities/Geometry/GeometryServer/intersect 500 (Internal Server Error)
What is left to be done?
THanks.
Lefteris,
The internal server error means that it just had an issue doing the intersect, not that you don't have your proxy setup correctly. I have see the internal server error before and restarting your ArcGIS Server sometime resolves that error if there is not something wrong with the geometries you are trying to use.
THank you Robert. THe restart didn't help.
I have a strange behaviour.
Basically I am trying a polygon layer on another polygon layer, both layers with multiple features.
So I run this loop to capture all intersections.
for(i=0;i<secondgraphics.length;i++){
geometryService.intersect(firstgraphics, secondgraphics, this.theoutput);
}
the graphics geom come from this:
var firstgraphics=[];
array.forEach(firstlayer.graphics, function (feature) {
firstgraphics.push(feature.geometry)
})
var secondgraphics=[];
array.forEach(secondlayer.graphics, function (feature1) {
secondgraphics.push(feature1.geometry)
})
I noticed that when when I use
geometryService.intersect(firstgraphics, secondgraphics, this.theoutput);
it works.
but when I use
geometryService.intersect(secondgraphics, firstgraphics, this.theoutput);
then I get the 500 error!
Is it possible that the error is due to the # of features in the secondlayer?
Lefteris,
Unfortunately I am not sure on that. I would just be guessing.