Close current CSP connection through code

CSP, Caché

Hi all,

Do anyone know how to force to close the CSP connection used before redirecting to a different page so a new connection ( and therefore a new session id) is generated?

The idea is to generate new CSP session once we log off our application so the session identifiers are different.

Best Regards


set %session.EndSession=1

See the class documentation for the %CSP.Session class, of which %session is an instance.

Hi John,


I've tryed that but is not working at all as the CSP connection id still the same, we want to generate a new one, not reuse it.



Why do you want the connection id to change? In CSP we route multiple requests to a few server processes to be able to handle massive numbers of client efficiently. However the process that handles the request does not hold any information about the session at all, all this information such as the license we hold is in the %session object so as long as you have a new %session object this is a brand new connection.



Using the same session Token for different application log ins is not correct as it leads to security issues.

For that reason we want to create a new CSP connection and remove previous one when the user logs out from our application. Is there any way to do so?