Select to view content in your preferred language

A problem about GP Service

755
3
05-30-2011 07:56 AM
anyu
by
Emerging Contributor
I create a  GP Service :buffer points.And use "featureset" to send the parameter.The code as follow:
  parameters.Add(new GPFeatureRecordSetLayer("Input_Features",fs ))
  When "fs" contains about 10 points,it can work.But when there are more points(about 50),the program abnormal.
   How strange it is.
   Why?
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
What version of ArcGIS server and API are you using?

Can you try to switch to ClientHttp for that GP Service URL to see if the issue will be solved?
bool httpResult = WebRequest.RegisterPrefix("http://GPServiceURL", WebRequestCreator.ClientHttp);


You can run Fiddler to see if the request is a GET or POST.
0 Kudos
anyu
by
Emerging Contributor
What version of ArcGIS server and API are you using?

Can you try to switch to ClientHttp for that GP Service URL to see if the issue will be solved?
bool httpResult = WebRequest.RegisterPrefix("http://GPServiceURL", WebRequestCreator.ClientHttp);


You can run Fiddler to see if the request is a GET or POST.

 
Why is it necessary to see if the request  a GET or POST?
0 Kudos
JenniferNery
Esri Regular Contributor
The HTTP web request becomes too long for a GET.

source: http://en.wikipedia.org/wiki/Query_string
Internet Explorer does not support URLs that have more than 2083 characters. There is no limit on the number of parameters in a URL; only the raw (as opposed to URL encoded) character length of the URL matters. Web servers may also impose limits on the length of the query string, depending on how the URL and query string is stored. If the URL is too long, the web server fails with the 414 Request-URI Too Long HTTP status code.

The common workaround for these problems is to use POST instead of GET and store the parameters in the request body. The length limits on request bodies are typically much higher than those on URL length. For example, the limit on POST size, by default, is 2 MB on IIS 4.0 and 128 KB on IIS 5.0.
0 Kudos