I would suggest using JSON in another way.

If you caught some errors, please provide more details, sometimes it is quite difficult to predict whats going on, and it helps to find the solution faster.

If you doing SOAP, it should be XML. If you need JSON response it could not be SOAP, it can be REST.

Why did you use altJSONProvider  instead of jsonProvider

I think it is possible to do, with little coding.

  • Set Inactive limit in system security settings.
  • While Inactive limit is a system-wide setting, you have to check  Account Never Expires  for those users who should not be expired.
  • InterSystems Cache has special task SecurityScan which executes every day, and disable expired users.
  • Create new system task, and schedule it to start after SecurityScan. This task should find disabled users in table Security.Users, and enable them and set flag ChangePassword, which will say to change a password on next login.

In CSP-Application you should choose Use Cookie for Session: Always

Or you can control it programmatically in %session with Property UseSessionCookie 

property UseSessionCookie as %Integer [ InitialExpression = 1 ];

Indicates whether sessions should be maintained using cookies or not. There are three possible values:
  • 0 - Never use cookies. This will pass the CSPCHD parameter around in all the url links and as hidden fields in the <FORM> elements.
  • 1 - Auto detect cookie support. This will start by trying to insert a cookie into the browser, if this fails it will switch to mode 0 and never use cookies for this session. The initial page will send both cookies to the browser and it will include the CSPCHD parameter in all links and forms.
  • 2 - Always use cookies. This will only use cookies so if the browser does not accept the cookie then the session state will not be maintained.

You can just pass any value to the called by #server(..myMethod(arg1,arg2))# or #call(..myMethod(arg1,arg2))# method.

Look at my simple example.

Class User.Page Extends %CSP.Page
{

ClassMethod OnPage() As %Status
{
  &html<<html>
<head>>
  write ..HyperEventHead()
  &html<
</head>
<body>
<label><input id="chbox" type="checkbox" onchange="checkboxChanged(this);">
Choose me
</label><br>
<select id="combo">>
  write ..comboboxOptions()
  &html<</select>>

  &html<
<script language="javascript">

function checkboxChanged(chbox) {
  var options #server(..comboboxOptions(chbox.checked))#;
  document.getElementById("combo").innerHTML options;
}

</script> 
</body>
</html>>
  Quit $$$OK
}

ClassMethod comboboxOptions(chbox = 0)
{
  set options = ""
  if chbox {
    set options = options _ "<option value=""11"">test1</option>"
    set options = options _ "<option value=""12"">test2</option>"
    set options = options _ "<option value=""13"">test3</option>"
    set options = options _ "<option value=""14"">test4</option>"
else {
    set options = options _ "<option value=""11"">value1</option>"
    set options = options _ "<option value=""12"">value2</option>"
    set options = options _ "<option value=""13"">value3</option>"
    set options = options _ "<option value=""14"">value4</option>"
  }
  return options
}

}

you can use cterm.exe for this task, so, you can run some script, or routine in Cache

or just run cache.exe directly. 

Microsoft Windows [Version 10.0.16299.248]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\Admin>c:\intersystems\ensemble\bin\cache.exe -sc:\intersystems\ensemble\mgr\

Node: DESKTOP-4IDCEJ0, Instance: ENSEMBLE

USER>

I hope this can explain

USER>zzdump $lb(100,200,50)

0000: 03 04 64 03 04 C8 03 04 32                              ..d..È..2

USER>zzdump $lb("100","200","50")

0000: 05 01 31 30 30 05 01 32 30 30 04 01 35 30               ..100..200..50

USER>k  set mem=$s,mem=$s set a=1234567890 write mem-$s
8

USER>k  set mem=$s,mem=$s set a="1234567890" write mem-$s
32

storing numbers as numbers in $listbuild, is a bit cheapier in memory

But sorry, I don't understand your worry about, how numbers were stored. It mostly does not matter. If I not mistaken, only one place where numbers as numbers are matter is $ZHEX function, which returns different result for string and for a number.

you can generate script right before call csession, but you don't need to save it to file.

echo -e "Write \"CurrentPath = ${PWD}\"\n" \
        "Write \"CurrentShell = ${SHELL}\"\n" \
        "halt\n" \
| csession cache -U%SYS

Or if you already have some script file as a template, you can use command envsubst (maybe you have to install it), which will replace these variables with real values.

envsubst text.txt | csession cache -U%SYS