Smartform is not responding while attempting to load from SmartObject
kbt137547
PRODUCTIssue
Smartform is not responding while attempting to load from the SmartObject.Symptoms
If a Smartform contains a view that loads from a SmartObject and the view tries to call the SmartObject to retrieve the results, it just keeps loading without any response.
However, when executing the SmartObject on SmartObjects Service Tester, the SmartObject takes a few minutes to return the results.
Troubleshooting Steps
To identify what is causing this issue, perform a network trace on the Form, and analyze the requests and responses. Either use your browser's developer tool or Fiddler to perform a network trace.
When the Form or View tries to execute a SmartObject method, it will do so by sending a request to AjaxCall.ashx.
By analyzing the request sent to AjaxCall.ashx, identify which SmartObject your form or view is trying to call.
By analyzing the response, check if the call to the SmartObject is successful. If the SmartObject method execution is successful, the results will be returned in the response.
If there is an error, the HTTP status code returned will not be 200, and the error message returned will be visible in the response.
In this case, the request to AjaxCall.ashx timed out before the response is being returned. Because there is no response, your view is unable to load the results. To resolve this, extend this time out value by doing the following:
- On the web server hosting K2 Smartforms, go to [Program Files]K2 blackpearlK2 Smartforms Runtime.
- Open web.config.
- Search for the following line:
<httpRuntime maxRequestLength="16384" enableVersionHeader="false" sendCacheControlHeader="false" executionTimeout="320"/> - The request time out is determined by the value in executionTimeout value. The default value for executionTimeout is 320 seconds. If your SmartObject method takes longer than 320 seconds to retrieve the results, increase the executionTimeout value.
- After you updating the web.config, perform an IISRESET to apply the changes to Smartforms.
Alternatively, if you are using a List View in your Form, consider splitting up your results into pages to speed up the loading process.