wraparound180 causes 414 error

4178
2
Jump to solution
05-12-2015 12:38 PM
JimNoel
New Contributor III

We recently added the “wraparound180” parameter to the <map> tag for our FlexViewer site to allow our features that straddle the 180E line to display together.  (We're using the WGS 1984 Web Mercator projection.)  This has resulted in a problem:  The layers on our server are no longer displaying.  On studying the HTTP traffic, we find that when the layer fails to display, it is due to a “414 Request-URI Too Long” error.  Looking at the request parameters, this seems to be a result of the “bboxSR” and “imageSR” parameters being much longer than usual. 

Normally, “bboxSR” and “imageSR” just have the the spatial reference ID of 3587.  However, when using wraparound180, these parameters are given the full spatial reference description rather than spatial reference ID.  As a result, the HTTP request is more than 2000 characters long, which causes the 414 error on our server.  Does anyone know why wraparound180 uses the full spatial description rather than spatial ID?

I had someone put a version of one our map services on a different server, and the long request worked fine there, so apparently using spatial description rather than spatial ID is "legal".  So we're looking into having our server configured to allow longer HTTP requests. However, we haven't had success with that yet. 

Another approach I thought about was changing the layer requests from GET to POST.  (GET seems to be the default.)  Is there a way of configuring the Viewer so it uses the POST method rather than GET?

We also have a website that uses the ArcGIS Flex API (rather than FlexViewer), so I would also like to know if the map object or ArcGISDynamicMapServiceLayer can be set to use the POST method.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jim,

  Using a proxy for your app would get you past this issue.

Viewer:

ArcGIS Viewer for Flex - using a proxy page

API:

Using the proxy page—ArcGIS API for Flex | ArcGIS for Developers

Or you could change your web servers url length limit:

IIS: Changing maxQueryString and maxUrl | My Tec Bits.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Jim,

  Using a proxy for your app would get you past this issue.

Viewer:

ArcGIS Viewer for Flex - using a proxy page

API:

Using the proxy page—ArcGIS API for Flex | ArcGIS for Developers

Or you could change your web servers url length limit:

IIS: Changing maxQueryString and maxUrl | My Tec Bits.

0 Kudos
JimNoel
New Contributor III

Thanks Robert, that looks like it will solve the issue!  We will try the proxy page.

0 Kudos