RegisterApplication

Creates the registration for this application and starts the connection. This method is equivalent to calling RegisterApplication(0).

Syntax

public void RegisterApplication()

Parameters

None.

Examples

  • Register an Application – Start registering the application and return at once.
    app.RegisterApplication();
    

Usage

You must set up the ConnectionProperties and ApplicationIdentifier before you can invoke registerApplication.

Application app = Application.GetInstance();

// set Application ID - need to match as the server side Application ID
app.ApplicationIdentifier = "SUP101";
ConnectionProperties props = app.ConnectionProperties;
props.ServerName = "supserver.mycompany.com";
props.PortNumber = 5001;
LoginCredentials loginCred = new LoginCredentials("supAdmin", "supPwd");
props.LoginCredentials = loginCred;

SUP101DB.SetApplication(app);

if (app.RegistrationStatus != RegistrationStatus.REGISTERED) 
{
// If the application has not been registered to the server,
// register now
app.RegisterApplication();
}