Cause: The most common use case is when an upload occurs and the URL is exceptionally lengthy. The query string sent to the AppServer can surpass the MaxQueryLength which by default is set to 2048 characters.
Resolution: To resolve this issue follow the steps below:
Open your web.config file on your AppServer and include the maxQueryStringLength attribute to accomodate the extra characters in your URL string. The number listed below is an example and can be adjusted based upon the neccessary length needed.
Using IIS 7:
- Open IIS and click on your Web Site.
- Open Request Filtering under the IIS section.
- Click on the URL tab.
- Edit Feature Settings.
- There is a field for MaxQueryLength that you can adjust to the necessary limit.
Using IIS 6:
- Stop the IIS Web server. To do this:
- On the AppServer click the “Start” button.
- Browse to “Administrative Tools”
- Select the “Services” item.
- The “Services” window should now appear.
- Scroll down to the bottom, and highlight the “World Wide Web Publishing Service” service.
- Right click on the “World Wide Web Publishing Service” service, and select “Stop”.
- The service will now stop. Depending on how many sites you have set up in IIS, the time it takes for this process to stop may vary.
Make sure you take a backup of the Metabase.xml file via windows explorer before making any changes. Editing this file incorrectly will cause IIS not to start, so care should be taken with any modifications to this file.
- Open a text file editor.
- Select File -> Open.
- Type in, or browse to the following file:
- Use a find tool in your text editor, and search for the first occurrence of: AspMaxRequestEntityAllowed.
- You should find an entry like this:
The “204800″ option at the end of this line is the limit in bytes. For example; 204800 / 1024 = 200kb
- Change this value to a desired setting. The below example uses 2MB:
2 x 1024 x 1024 = 2097152 bytes
You can use the above calculation, substituting the 2 for how many megabytes you wish to set the value to.
- Update the value in the Metabase.xml file to reflect your required size limit.
Note that in 7.3.15 this error is corrected by using an input mask of Post Data in AppStudio on the field control.