ASTA Server Login


 

The following is a list of events that occur when an ASTA client connects to an ASTA Server. By Default AstaClients do not go through the login process. Most production applications of course will require a login but this is not the default behavior of the AstaClientSocket. Set the AstaClientSocket.AutoLoginDlg to anything but ltNoChallenge to force a login.

 

 

OnClientConnect fires and the ClientSocket:TCustomWinSocket is added to the AstaServerSocket.UserList with No Username.

OnUserListChange fires with a tuConnect for state

if OnValidateSocket is assigned it is fired and the client is disconnected if the event returns a False in the IsValid:Boolean.

If the AstaServer.SecureServer is set to true only a Login message will be accepted next from an AstaClientSocket. If Encryption is used only messages that can be successfully encrypted will be processed by the server. If a message cannot be decrypted the client will be disconnected.

The AstaClientSocket starts the login process sending the UserName,Password, Application Name and Version information to the server along with the ClientSocketParams. All this informatin will be available in the AstaServerSocket.UserList after a successful login.

The AstaServer handles the login request in either the OnClientLogin event or the OnClientDBLogin event if the server is running in PersistentSession Threading Model.

The Login is processed and a message is sent to the client that can be handled by the OnLoginAttempt event.

If the Login Request is denied and the DisconnectClientsOnFailedLogin:Boolean is set to true then the Client is disconnected immediately.

A version check is made by the ASTAServerSocket and the OnAstaClientUpdateDecide event is fired to decide if the upgrade is to be allowed. If so the OnAstaClientUpdate event is fired. If an update is requested and confirmed a new version of the Client Application is streamed down and a new version of the client application is launched. Starting the whole login process one more time.

Any AstaClientDataSets opened at design time are closed and Opened after the ClientSocket connect so they can perform any selects from the remote server.

The AstaClientSocket then requests version information from the AstaServersocket using the Asta Remote Administrative API call of RequestUtilityInfo passing in uiServerVersion so the AstaclientSocket.ServerVersion can be update accurately.

 



ASTA Overview