Skip to main content


 

Symptoms


When opening a SmartForms Form, there is an "infinite spinner" and the page never finishes loading. This is working for the developer of the site (or the admin) but when the Destination user who has been assigned a task and needs to open this page, it doesn't open (infinite spinner - loads forever). When checking with the F12 Developer console, we get the error message: Property ‘PageRequestManager’: Object is null or undefined
 

Diagnoses


After some analysis of K2HostServer and "Sourcecode.forms.runtime.error" logs we couldn't really pinpoint the error, but we saw that the client was using custom web services that were connected to SmartObjects in these Views / Forms. Although the strange part is, this issue only happened on 2 forms even though some other Views made use of these same custom web services, and it only happened intermittently (sometimes it works, sometimes doesn't). We also saw that no rules were executed when opening the Form (by making the first rule on Form Initialize = open popup message box which never happened).

During a Fiddler trace of this error, we noticed an HTTP 400 error (request header too long) and following is the resolution which solved the issue.

 

Resolution

Problem description:
-----------------------
We had random and intermittent HTTP 400 errors when visiting various K2 sites on various environments / servers. This would include any of the following websites:
• Workspace
• K2 designer
• K2 viewflow
• Smartforms Runtime
It could happen from any browser, but often when we receive HTTP 400 from one browser you could open a different browser and then it would work from there. Also one user would have the error while another user has no problems, and later on it would be the other way around.
Solution
We found that the problem was related to the header request length. In your HTTP error log C:WindowsSystem32LogFilesHTTPERR you would find an entry like this:
2014-10-29 15:48:51 10.116.119.111 56746 172.26.121.111 80 HTTP/1.1 GET /workspace/Navigation/Navigation.aspx 400 - RequestLength –

When we investigated this with Fiddler we found that the request header was longer than the 16kb standard setting allowed by the HTTP Service. Typically the request headers were about 17 or 18 kb.

So the solution to fix this is to add the following registry keys on all your IIS servers:

At: HKEY_LOCAL_MACHINESystemCurrentControlSetServicesHTTPParameters

Add DWORD keys:

MaxFieldLength – Decimal – value = 32768
MaxRequestBytes – Decimal – value = 32768

Please note the following MS recommendations about setting these values. Do not make them too large! We decided on double the standard, but it could actually be much less according to this formula:
(4/3 * T bytes) 200
T = size of the request header.

http://support.microsoft.com/kb/820129/en-us
http://support.microsoft.com/kb/2020943

Now you have to restart the HTTP service for this to take effect. You could either restart the whole server or do the following which is probably quicker:
From the cmd prompt:
Net stop http
Net start http
When you run net stop http it might ask you if you also want to stop the other services that are dependent on HTTP (typically Windows Remote Management, World Wide Web Publishing, and Print Spooler, but there could be others). So start those services as well after you started http.

Now test it again and your HTTP 400 errors should have disappeared.

This finally solved the issue.

See this Microsoft Support Article - http://support.microsoft.com/kb/2020943




 
Be the first to reply!

Reply