Adjusting the sample PowerServer project according to your environment

Opening the sample PowerServer project

Open the sample PowerServer project in the painter.

  1. Load the SalesDemo workspace in the PowerBuilder IDE by selecting Windows Start | Appeon PowerBuilder 2022, and then right-clicking Example Sales App and selecting More | Run as administrator.

  2. Locate the salesdemo_cloud project file in salesdemo.pbl, and double click to open it in the painter.

    The project file contains multiple pages: Instructions, Client App, Web Server, .NET Server, Database, and Startup; and each page has two tabs: Basic and Advanced. Most settings in these pages are pre-configured and can stay as-is. You only need to follow the instructions in the subsequent steps to adjust a few settings based on your environment.


Updating the server configuration

Update the server configuration with the following steps:

  1. In the PowerServer project painter, select the Web Server page > Advanced tab.

  2. Click the Server Configuration button.

  3. In the Web Server Profile window that appears, click the Edit button.

  4. In the Add/Edit Server window, make sure Local server is selected and the Web root full path is set (by default it's set to the default web site's physical path: C:\inetpub\wwwroot), and then click Test File Path to ensure the path is valid.

    This guide assumes your OS is installed to the C drive and the default web site's physical path is C:\inetpub\wwwroot. If you encounter any errors when configuring the Web server profile, refer to Permission errors when configuring the Web server profile.

    Your client app files (including the cloud app launcher, runtime files, and application files) will be deployed to this specified Web root later.


  5. Click OK to save the server profile and return to the Web Server Profile window.

  6. Click the Upload Cloud App Launcher button.


  7. In the Upload Cloud App Launcher and Runtime window that appears, make sure the following are selected: Local, Default, Upload the runtime files for the apps, 32-bit, and 64-bit.

  8. Click Upload and make sure the upload is successful. This section Uploading the cloud app launcher and the runtime files has more details about this window.


Updating the PowerServer solution path

Update the path of the PowerServer C# solution with the following steps:

  1. Select .NET Server page > Basic tab in the PowerServer project painter.

    In the Web API solution location field, the default location is set to [current user]\source\repos.

  2. If the location in the Web API solution location field does not exist on the current machine, please select a valid one.


Verifying the PowerServer license

Verify that a PowerServer license has been automatically imported.

If not, import a valid license into the project settings using Auto Import (importing the current PowerBuilder CloudPro or trial license), or Import from File (file from the License Management page on https://account.appeon.com).


Verifying the Web API URL

Use the default URL "http://localhost:5091" in the Web API URL group, because in this guide, the Web APIs will be running on the built-in Kestrel server on the local computer, in order to quickly get started and running.

Make sure the port number is not occupied by another program. For how to verify if a port number is occupied, follow the instructions in Choosing an appropriate port number.

If you plan to publish the Web APIs to a dedicated server or apply a web debugging proxy tool to debug the deployed application, then use the actual IP address/domain name and port number, instead of localhost and 5091.


Verifying the database connection

Double check the database connection in the Database page of the PowerServer project painter.

  1. Select Database page > Basic tab in the PowerServer project painter.

  2. Make sure the selected provider is SQL Anywhere (ODBC) (or PostgreSQL, or SQL Server that you selected for running the demo during the product installation).

    If you use SQL Anywhere as the demo database, no change is needed for the database configuration. If you use PostgreSQL as the demo database, the default login account (user/password) is postgres/postgres.

  3. Make sure the option "I have read and agree to the license ..." is selected.

  4. Click Test Connection to make sure the connection is successful.