SharePoint list - SmartObject timeout - Failed to initialize the Context


Badge +7


 

Symptoms


The problem is, when the user leaves the internet session open for a while (at least 20 minutes) and they try to open the smartform immediately afterwards, an error occurred saying "The operation has timed out". The files in the SharePoint list are not retrieved.
At initialization, the view on the smartform only calls the "Get documents" method of the smartobject.
If you close the smartform and reopen it or do a refresh of the page then everything works correctly.

These errors were found in the K2 log :

"18691741","2015-05-06 12:08:25","Error","SmartObjects","10702","Error","SourceCode.SmartObjects.ServiceBroker [ExecuteSmartObject]",
"10702 An error occurred in the Workflows_Administratifs_SharePoint_Content service instance.
Failed to initialize the Context:
Url: http://intranethg_qua/Institution/ServicesCentraux/SystemesInformation/WorkflowsAdministratifs
Username:
Error Details: The operation has timed out","anonymous","0.0.0.0","W8SIS076:C:Program Files (x86)K2 blackpearlHost ServerBin","18691741","dec8eaf4a1604266bc24e22a161b4227",""

 

Diagnoses


What we know :
- It happens only after you leave the page session open a while (at least 20 minutes. I don't know the exact time)
- The Service Instance used by the SmartObject (in the SharePoint Content Service) uses the "Service account" authentication mode
- Service Instance Parameters :
* Service Time Out : 120000
- It's a distributed environment with one SharePoint server, one SharePoint WFE and one K2 server
- We use the NTLM authentication mode
- The site is new and the list is almost empty (just a few tests)
- "disableLoopbackCheck" is set to 1 on all SharePoint servers


It looks like session problems, but why is the first call to SharePoint done with the "Anonymous" user and not the K2 service account (If we trust the K2 log error details) ?

 

Resolution

We found that the problem comes from the session state time-out of the STS service (In IIS : K2 -> Identity -> STS -> Windows).
We set it to 8 hours rather than 20 minutes to avoid the time-out problem if the user leaves his Internet session open during working hours.
The problem could still occur if the user leaves the session open all night.
We also thought about setting an auto-refresh of the application pages every 30 minutes if the user leaves the session open.
That seems to be a good option but not flawless.

Some information from support side:

What happens is, after your session expires after 20mins or 8 hours (depending on the setting), the page will show a popup window that doesn't go away automatically in Internet Explorer. I've noticed it does close automatically in Chrome. The problem is also what happens after that. It would be best if the page stays static and doesn't get an infinite spinner, but in this case it happens and you'll have to manually refresh the page, meaning you could lose already typed-in data.

I'm not sure about the ETA of this fix.

Please see this KB article regarding K2 PTA:
http://help.k2.com/kb001226

If you are using PTA, it will always use NTLM. It is either/or, not both.
Kerberos will only be used if you have configured it.




 

0 replies

Be the first to reply!

Reply