Skip to main content
I've got a smart form that has been in production for some time that is used to initiate a workflow, and occasionally, when the user hits the submit button, this exception is thrown.

At first, I thought it was because the smart forms are designed to connect to the K2 server upon session startup, and maintain a reference to the connection in the session -- then if the web session times out, that reference is no longer valid. why it was designed like that is beyond me, but I digress

That may still be the case, but I have users who are getting this to happen intermittently after only 3-5 minutes of being on the form -- so the web session is not timing out (set to default of 20 minutes).

Any thoughts? I'm this close to opening a ticket.
Hi,

Well, I'm not sure exactly what happens - whether it is caused by a session timeout or something else but the fact of the matter is that the connection object used in the smartform is dropped for some reason and then generates this error.

We are aware of the problem and addressed it in the upcoming service pack. Before the connection is used, we will now verify its existance and re-instantiate it if it was dropped.

Sorry for the inconvenience,
Ockert
Hi Sodell,

Just to check, do you have more than 1 IIS server, and are they load balanced? If not, then this post won't be of any help, but if so...

In a multiple IIS server environment, session state by default is not shared between the multiple IIS machines. Therefore someone can request a smartform on one IIS server, set up their k2 connection in their ASP.net session on that IIS box. Then on their next request, they hit a different IIS box in your LB cluster, and the session state is missing, and most importantly so is the k2 connection.

That could explain why the error is intermittant because load balancing software/hardware might be restricting them to one machine (and session) for a certain period, preventing the error from appearing on every request.

If this is the issue, there isn't a workaround as far as I know. You can share session state between multiple IIS machines, but only if the objects stored in the session support ISerializable, which the K2 connection doesn't.

Obviously if you don't have multiple servers, this is all a bit useless for you 🙂 but never mind.

Maybe that helped.

Adam.
icon-quote.gifOckert:
We are aware of the problem and addressed it in the upcoming service pack. Before the connection is used, we will now verify its existance and re-instantiate it if it was dropped.


So when can I tell my rather upset business users this service pack is going to be available?
icon-quote.gifAdam:
Just to check, do you have more than 1 IIS server, and are they load balanced? If not, then this post won't be of any help, but if so...


One server. But thanks, anyway!
If the session is timedout intermediately...then there is a chance that the antivirus software running in the IIS box is touching the web.config file for a scan. This will force the IIS to invalidate all the active sessions.

Please refer to the microsoft support post:
http://support.microsoft.com/kb/316148/en-us (IIS session value lost problem due to antivirus-scan)

Make sure the web.config file is excluded from the antivirus scan.

Thank You
PraKash

Reply