Tech Tip: Utility Method to Toggle Automatic Web Session Management Programatically
PRODUCT: 4D | VERSION: 14.x | PLATFORM: Mac & Win
Published On: July 28, 2016
Below is a utility method to enable or disable the Automatic Web Session Management Programatically
// Util_SetAutoSessionManage // // Desription: // Sets the Automatic Session Management on or off // // Parameters: // $1: Boolean to Set the Automatic Session Management // True - On // False - Off // ---------------------------------------------------- C_BOOLEAN($1;$input) If(Count parameters=1) $input:=$1 WEB STOP SERVER If ($input=True) WEB SET OPTION(Web keep session;1) Else WEB SET OPTION(Web keep session;0) End if WEB START SERVER End if |
This method will not change the database settings and only applies to the session.