Open the sample PowerServer project in the painter.
-
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.
-
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.
Update the server configuration with the following steps:
-
In the PowerServer project painter, select the Web Server page > Advanced tab.
-
Click the Server Configuration button.
-
In the Web Server Profile window that appears, click the Edit button.
-
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.
-
Click OK to save the server profile and return to the Web Server Profile window.
-
Click the Upload Cloud App Launcher button.
-
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.
-
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.
Update the path of the PowerServer C# solution with the following steps:
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).
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.
Double check the database connection in the Database page of the PowerServer project painter.
-
Select Database page > Basic tab in the PowerServer project painter.
-
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.
-
Make sure the option "I have read and agree to the license ..." is selected.
-
Click Test Connection to make sure the connection is successful.