Synchronization Profile

The Synchronization Profile contains information for establishing a connection with the Unwired Server's data synchronization channel where the server package has been deployed. The Sybase.Persistence.ConnectionProfile class manages that information. By default, this information includes the server host, port, domain name, certificate and public key that are pushed by the message channel during the registration process.

Settings are automatically provisioned from the Unwired Server. The values of the settings are inherited from the application connection template used for the registration of the application connection (automatic or manual). You must make use of the connection and security settings that are automatically used by the Object API.

Typically, the application uses the settings as sent from the Unwired Server to connect to the Unwired Server for synchronization so that the administrator can set those at the application deployment time based on their deployment topology (for example, using relay server, using e2ee security, or a certificate used for the intermediary, such as a Relay Server Web server). See the Applications and Application Connection Templates topics in System Administration.

ConnectionProfile profile = SUP101DB.GetSynchronizationProfile();
profile.DomainName = "default";
profile.ServerName = "host-name";
profile.PortNumber = 2481;
profile.NetworkProtocol = "https";
profile.StreamParams.Trusted_Certificates = "rsa_public_cert.crt";

You can allow clients to compress traffic as they communicate with the Unwired Server by including "compression=zlib" into the sync parameters:

NetworkStreamParams streamParams = MyDatabase.GetSynchronizationProfile().StreamParams;
streamParams.Compression= "zlib";
streamParams.Zlib_Upload_Window_Size= 12;
streamParams.Zlib_Download_Window_Size= 12;

By default, compression is disabled.

You can allow clients to authenticate with a proxy server by including a username and password in the sync parameters. This feature supports Basic and Digest authentication as described in RFC 2617. With Basic authentication, passwords are included in HTTP headers in clear text; however, you can use HTTPS to encrypt the headers and protect the password. With Digest authentication, headers are not sent in clear text but are hashed.

SUP101DB.GetSynchronizationProfile().NetworkStreamParams += ";http_userid=supAdmin;http_password=supPwd";
Related tasks
Setting Up the Synchronization Profile