CreateSubSession(String, String):IOnionSession

Creates a new session with the indicated access data

New sessions can be created by means of this method. These sessions are based on the already existing session.

The difference between this session and a session created by means of the OnionSession class is that the permissions of this session are restricted by the main session. In the case of a SubSession, the data is called by means of the user of the main session and, if necessary, is filtered further afterwards for the user of the newly created session. This means the SubSession may be restricted from the beginning depending on the permissions of the user logged onto the main session.

If the connection is interrupted, then an exception of the type InvalidSessionException is triggered.

Furthermore, the user of the main session must have the role SessionHost, or otherwise an exception of the type RequiresSessionHostException will be triggered.

Parameter

userName

Type: System.String

This parameter is the username of the user for whom a new session is to be created.

If NULL is indicated as the value, an exception of the type System.ArgumentNullException is triggered.

password

Type: System.String

This parameter is the password of the user for whom a new session is to be created.

If NULL is indicated as the value, an exception of the type System.ArgumentNullException is triggered.