Unable to save changes to rule configuration

  • 16 May 2016
  • 1 reply
  • 5 views

Badge +9


 

Symptoms

 


When attempting to save the changes made to a rule configuration by clicking the "Finish" button, the rule configuration window turns grey instead.
 

 

Diagnoses

 


Issue occurs due to the data that is to be passed through is larger than what IIS can accept.
 

 

Resolution

The following changes must be made to the K2 smartforms designer web.config:

1. Set the maxRequestLength to a higher value:
<httpRuntime maxRequestLength="51200" /> <!--50MB-->

 

 

 

https://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength(v=vs.110).aspx
Note: Max value is 2097152

2. Add maxAllowedContentLength into the config:
 

 

This setting does not exit in SmartForms Runtime web.config by default and it has to be added in appropriate place. Its value has to be specified in bytes. Example below shows how to set this limit to be 50MB:

<requestLimits maxAllowedContentLength="52428800" /> <!--50MB-->

Locate <requestFiltering allowDoubleEscaping="true" /> line in your config file and remove closing slash from this line, then add two more lines below so that in conjunction with this edited line it looks as follows:

<requestFiltering allowDoubleEscaping="true">
<requestLimits maxAllowedContentLength="52428800" /> <!--50MB-->
</requestFiltering>

 

Note: Default maxAllowedContentLength value is 30000000.
https://docs.microsoft.com/en-us/iis/configuration/system.webServer/security/requestFiltering/requestLimits/

 

 

 

 



 

1 reply

Badge +7

Warning: this value of 2097152 for the maxRequestLength correspond to allow the client computer to upload a file up to 2GB to the server.

It could be view as an infrastructure issue and generate response time issue if several users trying to upload huge file at the same time.

 

More other, in 4.6.10, this value generate another issue:

 

 

ISSUE:

We are facing a problem with the Picture control.
We cannot upload new image files.
The error message says the maximum size was exceeded, although we are trying to use a small image:

Full message:
Koala.jpg
0 bytes
The image attachment exceeds the maximum size of 2048.00 MB

In fiddler:
The file attachment exceeds the maximum size of {0} KB.


RESOLUTION:

In file C:Program Files (x86)K2 blackpearlK2 smartforms Designerweb.config
Reduce the maxRequestLength by changing 
maxRequestLength="2097152" (Corresponding to 2GB)
to 
maxRequestLength="32000" (Corresponding to 32MB)

Note: this issue is reproductible with a 4.6.10 but not a 4.6.11.

This setting "maxRequestLength" indicates the maximum file upload size supported by ASP.NET. This limit can be used to prevent denial of service attacks caused by users posting large files to the server. The size specified is in kilobytes. The default is 4096 KB (4 MB).

Reply