ClientSession Class Methods
- Last UpdatedNov 06, 2025
- 7 minute read
For a list of all members of this type, see ClientSession members.
| Name | Description | |
|---|---|---|
![]() | ChangePassword | The ChangePassword() method opens the Change Password dialog to allow the user to change their password. If the user does not cancel the dialog, the user's password is changed to the new password. |
![]() | CheckSessionHealth | The CheckSessionHealth() method checks for the session and creates it if it does not exist. |
![]() | ClearFormLoginStatus | The ClearFormLoginStatus() method removes the dialog's name from the Form Login Status collection. The dialog name is used when there are multiple controls on a dialog that might request a logon. If the user cancels one logon request, the user should not be presented with logon requests from the rest of the controls on the dialog. This method should be called when the dialog is being destroyed. |
![]() | CloseChildForms | The CloseChildForms() method recursively calls itself to close all open dialogs. This method does not work inside of InTouch. |
![]() | EndSession | The EndSession() method ends the current session with the Middleware. |
![]() ![]() | GetAllGeneralParameters | The GetAllGeneralParameters() method retrieves all system parameters. |
![]() | GetCurUserCurEntInfo | Overloaded. This overload of the GetCurUserCurEntInfo() method retrieves a DataRow from the current user's entity status DataSet for the specified entity and job position. The DataRow contains the information about the job currently running on the entity. |
![]() | GetDS | The GetDS() method retrieves a DataSet based on the XML containing a call to the Middleware. |
![]() | GetDSbySQL | The GetDSbySQL() method retrieves a new DataSet based on the SQL statement passed as a parameter. The SQL statement must be a single SELECT statement. |
![]() ![]() | GetInstance | The GetInstance() method is a class-level method that returns a client session object. The first time this method is called, it creates the ClientSession object. Thereafter, it returns the ClientSession object created by the first call. The ClientSession object is the main entry point into the Client API. It holds the list of logged in users and the current user. |
![]() | GetLangStringsObject | The GetLangStringsObject() method retrieves a LangStrings object for the specified language. The LangStrings object contains the language strings used by MES for UI and error messages. |
![]() | GetServerTime | The GetServerTime() method retrieves the time from the Database server. |
![]() | GetVersion | The GetVersion() method gets the version of the assembly that is currently executing. |
![]() | Login | The Login() method attempts to log the specified user onto the session without prompting the user for a user ID or password. The user's ID and password are passed to the session as parameters. The session must exist or the logon attempt fails. |
![]() | LoginWithDialog | Overloaded. The LoginWithDialog() method opens the Login dialog to allow a user name and password to be entered. The dialog then attempts to log the user on using the information entered. If the Login dialog is canceled or errors, it records that fact along with the name of the dialog that called for the logon. This prevents the Login dialog from being opened for any other controls on the same dialog. |
![]() | LogOffAllUsers | The LogOffAllUsers() method logs off all users without any prompts. |
![]() | LogOffCurrentUser | The LogOffCurrentUser() method logs off the current user from the session and opens the Switch User dialog to log on another user. |
![]() | LogOffUser | Overloaded. The LogOffUser() method logs off the specified user from the session. This overload of the method includes a flag that determines whether to display a confirmation dialog after the user attempts to log off. |
![]() | OnRefreshControls | The OnRefreshControls() method causes the current user's entity status to be refreshed and causes a RefreshControls event to be fired. |
![]() | PopupSwitchUserDialog | Overloaded. The PopupSwitchUserDialog() method opens the Switch User dialog. If called and no users are currently logged onto the session, the normal logon is processed. Otherwise, the Switch User dialog is loaded. If a new user is logged on, the logon ent dialog automatically displays. |
![]() | RefreshCurUserStatusDataSet | The RefreshCurUserStatusDataSet() method updates the current user's entity status. It creates a record set that contains the job information for all entities to which the user is logged on. This record set can be retrieved by calling the GetCurUserCurEntInfo() method. |
![]() | RefreshSystemAttributes | The RefreshSystemAttributes() method refreshes the in-memory system attribute by re-reading the system attributes from the database. |
![]() | RemoveControlFromOMISingleSignOn |
The RemoveControlFromOMISingleSignOn() method removes the control from the list of controls using OMI single sign-on. |
![]() | RemoveControlFromSingleSignOn |
The RemoveControlFromSingleSignOn() method removes the control from the list of controls using a single sign-on. |
![]() | SendXMLCmd | Overloaded. The SendXMLCmd() method submits an XML command to the Middleware. This overload of the method simply returns the XML response to the caller as a string, whether the command was executed successfully or not. No analysis or decoding is performed on the result. |
![]() | SetupSingleSignOn | Overloaded. The SetupSingleSignOn() method is called by a control when the control is running inside OMI or InTouch. It allows for MES controls to use the logged-on OMI or InTouch user as the MES user. It also registers the control as using single sign-on. |
![]() | StartLoggingXMLMsgs | The StartLoggingXMLMsgs() method starts a message logging session. This logs all XML commands sent to the Middleware through the ClientSession object's SendXMLCmd() methods. |
![]() | StartSession | The StartSession() method starts a session with the Middleware for the specified client type or joins the caller to the current session if a session has already been started. The client type is one of the types from the ClientTypes enumeration, which signifies the client that is currently using the session. Examples of client types include Operator and DataEditor. The Middleware checks that sufficient licenses of this client type are available before allowing the session. If successful, the session ID is saved as a private variable and exposed as a read-only property. |
![]() | StopLoggingXMLMsgs | The StopLoggingXMLMsgs() method terminates a message logging session. This method also saves the cached logs to the file specified in the StartLoggingXMLMsgs() method. |
![]() | SwitchUser | The SwitchUser() method switches between users already logged onto the current session. This method sets the curUser property and causes a UserChanged event to fire. This method also changes the name of user associated with the session in the database. Setting the curUser property updates the current user on the client side, but it does not change the database. |
![]() | UpdateSystemParameter | The UpdateSystemParameter() method updates the value of the specified system parameter. |
![]() | VerifyUser | The VerifyUser() method verifies that the user ID matches an existing user and that the password is correct for the user. |
| Name | Description | |
|---|---|---|
![]() | OnUserChanged | Function to raise the UserChanged event by invoking the relevant delegates. "sender" is always the current instance of the class, "eventargs" are specified by relevant delegate |


