This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
You might receive the following errors when trying to add the State(s) for a form: "Unable to Save or Check In the Form  OK (parsererror)" or "Maximum Request Length Exceeded."
- The issue indicates that the maximum amount of data that can be sent to the server has been reached. You can however, increase the limit by modifying the web.config.
- The error "Maximum Request Length Exceeded" indicates that the web request is hitting the ASP limit as per the article: https://forums.iis.net/t/1169846.aspx
Please also see our Knowledge Base (KB) article: http://help.k2.com/en/kb001564.aspx. As per this KB, please see 6th Bullet Point under 'Forms:'
"When creating a Form that consists of many Views and multiple States the Form rules are not visible after adding an additional State. This issue occurs when the Form definition increases and exceeds the "Maximum Request Length" specified in the web.config."
To perform the troubleshooting steps:
1. Go to C:\Program Files (x86)\K2 blackpearl\K2 SmartForms Designer\web.config
2. Make a backup of the file
3. Locate the following line: "Increase the maxRequestLength"
4. Increase the maxRequestLength in the "web.config" for "K2 SmartForms Designer" on both K2 nodes from the default value to larger number value
5. Set the maxRequesstLength to 2097151
- This is the maximum allowable length that IIS can handle.
- MaxRequestLength is always measured in KiloBytes(KB) whereas the maxAllowedContentLength is measured in Bytes
- The absolute maximum limit is 2GB (maximum size of a .NET object). Since SmartForms sits on IIS, this limitation is an IIS setting. If the SmartForms limit is set higher than 2097151 you might experience bad performance.
- The recommendation is to set the maxRequestLength to 2097151 Kilo Bytes.
For more information, please refer to the link below; https://forums.asp.net/t/2085410.aspx?What+maximum+value+is+supported+for+maxRequestLength+and+maxAllowedContentLength
6. Save the file and do an IISRESET
7. Clear the browser's cache, restart the browser and try editing the form again.
For example, if the default value is "23768," try increasing the max request length to i.e. "2097151."
Additional step: If this doesn't resolve the issue, please see point number 4 and redo the same step, but this time it's for "K2 SmartForms Runtime" folder, increase the length and follow points 6 and 7.
8. The issue should now be resolved.