07-09-2020, 11:51 PM
(07-09-2020, 04:08 PM)Ryszard@sfd.co Wrote: A little context, service running on Windows Server 2019, 8Gb memory, 1Gbps internet connection, we are using IWBootstrap, and TIWBSButton, LockOnSubmit is set to true.
The button has a script event onClick of document.getElementById("BUTTON").disabled = true; to disable on click, which works fine.
The callback is for signing a number of different types of documents using https://captaincodeman.github.io/sign-he...sign-here/
Within the button AsyncClick event we call, most of the time it is rock solid.
WebApplication.
CallBackResponse.
AddJavaScriptToExecute(
'if (signaturePad.isEmpty())' + sLineBreak +
'{' + sLineBreak +
' ajaxNotify("OnPleaseSign");' + sLineBreak +
'} else' + sLineBreak +
'{' + sLineBreak +
' ActivateLock();' + sLineBreak +
' var dataUrl = signaturePad.toDataURL();' + sLineBreak +
' var signature = dataUrl.replace(/^data:image\/(png|jpg);base64,/, "");' + sLineBreak +
' $("#HIDDEN_signature").val(signature);' + sLineBreak +
' AddChangedControl("signature");' + sLineBreak +
' ajaxNotify("OnSignature");' + sLineBreak +
'}'
);
We have tried the code in the onClick script event.
It looks like the IWLocker is shown at the start of Async button event then cleared at the end of the click, the ActivateLock() in the call was added to try and prevent re-clicking.
Looking at logs the callback can be 100ms to a couple of minutes (mobile device?) before it returns, if it’s that long the ActivateLock isn’t happening and the user can click where they like thinking the page is dead.
The odd “Session is already locked” is not the end of the world, but the first causes a cascade of sessions to fail, not all, as other signatures come in.
09:37:27:175 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:38:14:067 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:39:44:900 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:39:50:522 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:40:14:417 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:40:16:840 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:40:51:678 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
09:41:13:646 IWServerControllerBaseException: Session is already locked. (ESessionAlreadyLocked)
.
.
.
Exception message : Session is already locked.
Session ID is invalid.
Exception class : ESessionAlreadyLocked
The only option is restart the service. Any help / suggestions welcome.
This shouldn't happen and I don't think this is caused by IW. Can't one of your processes be just blocking other uses (even a locked table or record in a Database can do it for multiple users)?

