Wednesday, March 7, 2012

"Request string is too long" Error Using Coloring Analysis

The request string for creating a Coloring Analysis is indeed very long compared to other features. That's why you get this error only when you make a Coloring Analysis request.
The reason that you get this error is, your application is running on a domain that is different from the domain LocationBox is running on. In order to solve this, you should configure a proxy on your server. You will find the directions for configuring proxy on Apache Tomcat and IIS servers.

Apache Tomcat

1. Open the httpd.conf file and uncomment the following lines.

   LoadModule proxy_http_module modules/mod_proxy_http.so
  LoadModule proxy_module modules/mod_proxy.so


2. Add the following lines to httpd.conf
<IfModule mod_proxy.c>
  ProxyRequests Off
<proxy *>
  Order deny,allow
  Deny from 127.0.0.1
  Allow from all
</proxy>
  ProxyPass /mapviewer http://www.locationbox.com.tr/mapviewer
  ProxyPassReverse /mapviewer http://www.locationbox.com.tr/mapviewer
</IfModule>
3. Restart Tomcat.

4. Try accessing //localhost/mapviewer (include the port if Tomcat is not using port 80 (ie. //localhost:xxx/mapviewer)

IIS

1. Install ISAPI_Rewrite to use the proxy service. You can download ISAPI_Rewrite from here:

http://www.helicontech.com/download-isapi_rewrite3.htm

(Note: The Lite version of ISAPI_Rewrite does not have proxy support.)

2. Open ISAPI_Rewrite Manager and click "Edit" on configuration section.


3. Paste the following text to the editor.

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.88

RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 32
RewriteBase
# unsupported directive: [ISAPI_Rewrite]

#  3600 = 1 hour
# unsupported directive: CacheClockRate 3600

#  Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule ^/httpd(?:\.ini|\.parse\.errors).*$ / [NC,F,O]
#  Block external access to the Helper ISAPI Extension
RewriteRule ^.*\.isrwhlp$ / [NC,F,O]

RewriteProxy ^/mapviewer(.+)$ http\://www.locationbox.com.tr/mapviewer$1 [NC]



4. Click "Apply" on configuration section.


5. Try accessing //localhost/mapviewer/ . Make sure that you add "/" at the end of your test url. (Include the port if Tomcat is not using port 80. ie. //localhost:xxx/mapviewer/)