Configuring a Profile from a Generated Project

In a development or test environment, you can set up the client-side certificate by configuring the profile from the generated Windows Mobile project in Visual Studio Edition, instead of from the client machine, laptop, or device.

You can also copy the certificates to the client, and set up or modify the profile to use the certificates, from Unwired WorkSpace instead of from the client machine. Keep in mind the following guidelines:
  • HTTPS is only established between HTTPS endpoints. The example values entered in WorkSpace for a generated project would only be used in the development or test environment. These values would not automatically deploy into a production environment.
  • A Relay Server is used as an HTTPS endpoint in the example below, and would make a convenient endpoint for a development or test environment. But your production environment may vary (for example, you may use a third-party HTTPS solution that includes hardware load balancers, reverse proxies, and others).
Note: Client-side certificates are not supported in UltraLiteJ (BlackBerry devices).
  1. Change the connection profile:
    1. Open the generated Windows Mobile project.
    2. Open the ApplicationInit.cs file.
    3. Locate the InitializeProfiles method.
  2. Configure the profile:
    profile1.MobiLinkPort = Int32.Parse("443");
    profile1.MobiLinkStreamType = Sybase.UnwiredPlatform.Data.MobiLinkStreamType.Https;
    profile1.MobiLinkStreamParams = "url_suffix=/ias_relay_server/client/rs_client.dll/[SUP_FARM_ID];
    tls_type=RSA;trusted_certificates=[Output_File_Folder]\\rsa_root.crt;identity=[Output_File_Folder]\\id_client.pem;
    identity_password=pwd;";
    Note: The Output_File_Folder is where the project is deployed to an emulator or device. If the project output file folder is "%CSIDL_PROGRAM_FILES%\WinMobile_Sol", then set trusted_certificates equals "\\Program Files\\WinMobile_Sol\\rsa_root.crt".
    Client Certificates - Windows Mobile
  3. Add the certificate files:
    1. Right-click the project, and select Add > Existing Item .
    2. Find the two files rsa_root.crt and id_client.pem, and add them to the project.
    3. In Solution Explorer, choose the two files, open the Properties window, and change Build Action to "Content" and Copy to Output Directory to "Copy always."
  4. If you encounter an error, take action based on the error reported. See Resolving Client-Side Certificate Errors.


Created July 22, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com