PowerServer 2022 R3 Help

PowerServer 2022 R3


Table of Contents

What's New
PowerServer 2022 R3
New Features
Supporting .NET 8.0
Changing Web API URL when configuring to deploy to IIS
Selecting whether to deploy and package Web APIs
Configuring timeout and MaxSPCache before deployment
Importing/Exporting the launcher profile
Importing/Exporting the server profile
Signing improvements
Loading images via URL
commandline argument saving option (in pbapp.ini)
Getting the deployment version via CloudAppGet
Supporting more image formats for custom launcher
PowerBuilder features
Upgrade Guide
Bug Fixes & Known Issues
PowerServer 2022 R2
New Features
PowerServer Project deployment refactoring
DB2 support
Web API URL enhancements
Ultra-fast build option
Supports Strict encryption for SQL Server
Solution changes
Licensing site changes
PowerBuilder features
Discontinued/Obsolete features
Upgrade Guide
Bug Fixes & Known Issues
PowerServer 2022
New Features
Cloud App Launcher refactoring
PowerServer project painter refactoring
PowerServer performance enhancements
PowerServerLabel and PowerServerResult
Unsupported feature detection enhancements
PowerServer project debugging
PowerServer toolbar changes
HTTP/2 support
TLS 1.3 support
Ignoring PowerServer certificate errors
Enhanced PowerScript features
.NET 6.0 support
Authentication template for AzureAD
Web API default port changes
PowerServer log level changes
Licensing server backup
Upgrade Guide
Bug Fixes & Known Issues
PowerServer 2021
Installation
PowerServer components
Installation requirements
Client PC
Development PC
Server
File server
Database
Network requirements
Quick Start
Guide 1: Deploying to local environment (built-in Kestrel)
Overview
Preparing a local development environment
Verifying the example sales app
Minimal efforts: Deploying the sample PowerServer project
Adjusting the sample PowerServer project according to your environment
Deploying the PowerServer project
Running the installable cloud application
Full experience: Creating and deploying a new PowerServer project
Creating the PowerServer project
Deploying the PowerServer project
Running the installable cloud application
Guide 2: Deploying to local IIS
Setting up the local IIS server
Installing IIS in Windows
Installing ASP.NET Core Hosting Bundle
Configuring and deploying the PowerServer project
Configuring the server profile
Deploying the project
(Optional) Verifying the Web APIs
Running the installable cloud application
Guide 3: Deploying to remote IIS
Setting up a remote IIS server
Preparations
Installing IIS in Windows Server
Configuring IIS
Installing Web Deploy
Installing ASP.NET Core Hosting Bundle
Configuring and deploying the PowerServer project
Configuring the database connection
Configuring the server profile
Importing the production license
Deploying the project
(Optional) Verifying the Web APIs
Running the installable cloud application
Guide 4: Deploying multiple apps to one site
Creating an IIS web site
Configuring and deploying the PowerServer project
Converting the Web APIs to IIS sub-app
Verifying the Web APIs
Configuring the Web API URL
Guide 5: Deploying the client app separately
Deploying the client app separately
Installable cloud app
Installable cloud app
Overview
Config & deploy
Compilation concepts
Create the PowerServer project
Configure the PowerServer project
Configure a server for deployment
Configure the Web API settings
Import and deploy license
Configure the database connection
Analyze the unsupported features
Build the PowerServer project
Upgrade the PowerServer project
Walkthrough: Deploying your PowerServer project to remote servers
Walkthrough: Applying a production license to an existing PowerServer project
Run & manage
Client app & apprun.json
Configure the Web API URL
Run the installable cloud application
Change the deployed app using commands
Customize the app entry page
Manage app versions/updates
Support cookie validation
Undeploy the client app
Uninstall the client app
Package & distribute
Package the installable cloud app
Install the installable cloud app
Tutorial for ISVs: Packaging & distributing the installable cloud app
Cloud app launcher
About
Customize
Upload
Install
PowerServer Web APIs
Concepts
PowerServer C# solution
PowerServer Web APIs
PowerServer NuGet packages
Built-in Kestrel
web.config
PowerServer in IIS
Web API URL
Auth server
What settings will be deployed to the C# solution
What settings can be modified in the C# solution
Run PowerServer Web APIs
Check the status of Web APIs
Support HTTPS
Use SSL certificate
Ignore PowerServer certificate errors
Support HTTP/2
Support TLS 1.3
Load certificate in Kestrel
Load certificate in IIS
Modify Windows 10 registry
Access PowerServer Management APIs
View API docs in Swagger UI
APIs for managing application and transaction mapping
APIs for managing cache and cache group
APIs for managing license
APIs for managing session
APIs for managing statistics
APIs for managing transaction
Run the ServerAPIs.Tests project
Configure the timeout settings
Configure the log settings
Upgrade PowerServer NuGet packages
Server Setup
Overview
Kestrel
Overview
Starting Kestrel in development environment
Starting Kestrel in production environment
(Optional) Using a reverse proxy server
Apache (Windows)
Apache (Linux)
Nginx (Windows)
Nginx (Linux)
IIS
IIS (in-process hosting)
In-process hosting vs. out-of-process hosting
Preparations
Installing IIS
Creating an IIS website
Configuring IIS
Configuring SSL on IIS
Installing Web Deploy
Troubleshooting tips for Web Deploy
Installing ASP.NET Core Hosting Bundle
Deploying Web APIs to IIS
Automatic deploy
Manual deploy
Running and Verifying the Web APIs
Docker
Overview
Setting up Docker
Setting up a docker host (Docker Engine)
Setting up a docker registry
Setting up the database server
Preparations
Installing and running the database
Publishing to Docker
Preparing the development PC
Modifying and re-deploying the PowerServer project
Publishing Web APIs to Docker
Specifying the Web API URL
Kubernetes
Overview
Before you begin
Configuring Azure Kubernetes Service
Creating a Kubernetes cluster in AKS
Connecting to the Kubernetes cluster
Installing ingress controller
Logging into Azure container registry
Creating a database
Containerizing the installable cloud app
Preparing the application
Creating the container images
Pushing images to Azure container registry
Deploying the application to the Kubernetes cluster
Creating the YAML manifest files
Deploying the application
Configuring the domain name
Testing the application
Azure App Service
Prerequisites
Deployment Architecture
Steps Summary
Cloud Database
Creating the Database Resource
Configuring the Database
Dumping the Database
Restoring the Database
Web APIs
Creating the App Service
Configuring the PowerServer project
Manual Deployment
Direct Deployment (Visual Studio)
Cloud App
With Static Web App
With Azure Storage
Troubleshooting
no pg_hba.conf entry for host
Workflow deployment fails with "Failed to find a default file in the app artifacts folder (/). Valid default files: index.html,Index.html." error
Azure Container Instances
Prerequisites
Overview
Deployment Architecture
Creating an Azure Container Registry
Preparing the PowerServer Project
Containerizing and Deploying Web API
Pushing the container to the Azure Container Repository
Creating the Container Instance
Updating the Web API URL on the PowerServer project
Publishing the Cloud App Installer
Using Nginx Container
Using IIS Container
Creating a home page
Tagging and pushing the image
Creating the container instance
Appendix
Customizing the Containers' URLs
Troubleshooting
Cannot push image to Azure Container Registry
AWS Elastic Beanstalk
Prerequisites
Deployment Architecture
Steps Summary
Creating an application and environment
Cloud Database
Making the database publicly accessible
Restoring the PBDemoDB database
Web APIs
Configuring the database URL
Configuring the Web API
Publishing the project
Disabling public access from the database
Cloud App
Creating and configuring the bucket
Creating an index.html file
Uploading the Cloud App
Troubleshooting
Uploading and deploying the Web APIs to Elastic Beanstalk fails
Trying to access the Web APIs returns HTTP 502 Bad Gateway
File server
Overview
IIS
Preparations
Installing Web Server (IIS)
Configuring SSL on IIS
Packaging and copying the client app
Apache on Windows
Preparations
Installing Apache HTTP Server
Configuring SSL on Apache
Packaging and copying the client app
Apache on Linux
Preparations
Installing Apache HTTP Server
Configuring SSL on Apache
Configuring Apache to be case-insensitive
Packaging and copying the client app
Nginx on Windows
Preparations
Installing Nginx
Configuring SSL on Nginx
Packaging and copying the client app
Nginx on Linux
Preparations
Installing Nginx
Configuring SSL on Nginx
Configuring Nginx to be case-insensitive
Packaging and copying the client app
Load-balancer
Overview
Nginx
Using Nginx Sticky Module
Using Nginx Plus
Using IP hash load-balancing
Apache
IIS
Appendix: FTP server
Preparations
Enabling the FTP service
Creating an FTP site
Configuring SSL on FTP server
Uploading the application via FTP client
Database Connections
Concept differences
Connection differences
Transaction differences
One transaction vs. multiple transactions
Transaction timeout vs. no transaction timeout
Transaction management differences
Transaction issues
Transaction timeout in stored procedure
Select Lock
DBParm differences
Supporting multiple database types
Database type & driver
Database type
Database driver
ASE database
Caches
What is a cache?
Creating caches in the IDE
Download the database driver
Configure the database connection
Create the DB connection profile
Managing caches in PowerServer
Connection techniques
Connection options
Handling various connection scenarios
Static connection
Creating transaction-to-cache mappings in the IDE
Managing transaction-to-cache mappings in PowerServer
Dynamic connection
Using CacheName property of DBParm
Using CacheGroup property of DBParm
Using LogID and LogPass properties
Using Transaction object properties
Long connection
When to enable long connection
How to enable long connection
Managing database connections
Storing database connections in the file or database
Managing database connections via APIs
Walkthrough: Connecting to the database
Overview
Accessing the Database Configuration dialog
Connecting with the DB2 database
Installing DB2 driver
Creating a cache
Mapping the transaction object
Connecting with the Informix database
Installing Informix driver
Creating a cache
Mapping the transaction object
Connecting with the MySQL database
Installing MySQL driver
Creating a cache
Mapping the transaction object
Connecting with the Oracle database
Installing Oracle driver
Creating a cache
Connection types in Oracle
Mapping the transaction object
Connecting with the PostgreSQL database
Creating a cache
Mapping the transaction object
Connecting with the SQL Anywhere database
Starting the SQL Anywhere database
Configuring ODBC for SQL Anywhere
Creating a cache
Mapping the transaction object
Connecting to SQL Anywhere database in Linux
Connecting with the SQL Server database
Selecting a proper authentication mode when configuring SQL Server connection
Configuring the SQL Server database server
Creating a cache
Connecting to Azure SQL
Mapping the transaction object
Connecting with the Adaptive Server Enterprise database
Configuring ODBC for ASE
Creating a cache
Mapping the transaction object
Troubleshooting
Unable to connect to remote SQL Server database over Named Pipes even though local database can be connected
Using the PostgreSQL CA certificate for SSL connection, the verification fails
Communication error when connecting with the Informix database
Security
Security whitepaper
Authentication
Important notes
Introduction to built-in authentication
Using JWT
Preparations
Modifying the PowerBuilder app
Modifying and re-deploying the PowerServer project
Authenticating users against a file or database
Appendix
Using Amazon Cognito
Preparations
Creating the Amazon Cognito user pool
Modifying the PowerBuilder app
Modifying and re-deploying the PowerServer project
Modifying the authentication template
(Optional) Testing the Cognito server
Using Azure Active Directory service
Azure Active Directory (AD)
Azure Active Directory (AD) B2C
Using other authentication servers
Using Okta OIDC (OpenID Connect)
Using Visual Guard
Unsupported Features & Workarounds
How to detect unsupported features
Unsupported features & workarounds
Unsupported features that can be detected
SetTrans
Data pipeline
MobiLink
Oracle RPC arrays
SQLPreview
SQLReturnData property
Transaction trace
Retrieve As Needed and Rows to Disk
Commit or Rollback Transaction using Dynamic SQL
Data retrieval in the RetrieveRow event
Unsupported features that cannot be detected
Unsupported use cases in Embedded SQLs
PBD
SyntaxFromSQL
DBParm properties
Database synonym
SP result sets
Multi-threading
Discrepancies & workarounds
Discrepancies that cannot be detected
DB connection
Alias name
rowsupdated value
DisableBind parameter
TableBlob retrieval
Dynamic DataWindow
TransactionName
Data type in Dynamic SQL Format 4
Decimal data type in static SQL or DataWindow
Timing of transaction rollback
Oracle AutoCommit and Lock
Stored procedure parameter
Transaction commit
Use Describe in Dynamic SQL Format 4
Bit data field
SelectBlob/UpdateBlob supports UTF8 only
SQLNRows property (with Cursor)
SQLCode property (with SP)
Column name from view
Incompatible coding styles
PBLs contain DataWindows with the same name
Object name using C# reserved words
DataWindow name containing special characters
Editing SQL
Column order in data source and Column Specification
One compute expression containing multiple computed columns
Cursor syntax
Syntax after UNION
Custom DataWindows from InfoMaker
Troubleshooting
Configuring and deploying PowerServer projects
Permission errors when configuring the Web server profile
Syntax error during the build process
DB driver error during the build process
Error in the Unsupported (DWs) window
Failed to generate the PowerServer Web APIs project
Error uploading application files to FTP
Changed PBL list
"The string 'xxx' was not recognized as a valid DateTime" when converting DataWindow to data model
"Invalid object name 'xxx'" when converting DataWindow to data model
Failed to load database driver for PowerServer project
Failed to load database driver when building/deploying PowerServer project
Running installable cloud apps
Cloud app launcher and application executable
Failed to get the app publisher from the server
Failed to download the config file / installation package
App cannot run because the local version expired
Cannot start cloud app launcher
Application not found
Application executable disappeared suddenly
Window is slow to open
Models and controls
Cannot retrieve data when data includes null values
PBSELECT DataWindow error
RibbonBar control displays blank
Server
PowerServer Web APIs failed to start
How to figure out if the deployed Web APIs can run at all
Session errors
Transaction errors
IIS-related errors
Failed to connect to the license server: No such host is known
Version of PowerServer Nuget packages does not match that of PowerBuilder
Unauthorized error
Database
Different results returned from an ASE stored procedure
SelectBlob data truncated
Garbage letters display when retrieving multibyte data
Slow app performance with SQL Anywhere
64-bit database cannot be connected from IIS
SQLHandle not found
"Invalid object name 'xxx'" when executing ESQL
Inconsistent information with set_context and sys_context
Others
Unresolvable external pbdom_document
License errors
Failed to call the license server API
Failed to login the license server
Access to powerserver\licoffdata.bin is denied
Cannot access License.json
"The application license is invalid" error
PowerServer solution errors
Unable to find package PowerServer.Api or PowerServer.Core
Failed to update NuGet packages in PowerServer C# solution
Runtime error numbers
Performance Tuning
Introduction
Performance suggestions on project compilation and deployment
Performance suggestions on loading installable cloud apps for the first time
Performance suggestions on running installable cloud apps
Debugging the performance
Working against the impact of Internet and slow networks on runtime performance
Hosting Web APIs and database on the same LAN
Web API publishing method
Optimizing database server performance
Tuning excessive server calls
Overview
Technique #1: grouping multiple server calls with PowerServerLabel
Technique #2: partitioning transactions via stored procedures
Technique #3: partitioning non-visual logic via server-side REST APIs
Technique #4: eliminating recursive embedded SQLs
Technique #5: eliminating DW computed fields calling user functions that have ESQL
Minimizing large data transmissions
Overview
Technique #1: retrieving data incrementally
Technique #2: minimizing excessive number of columns
Testing, Debugging, & Error Handling
Load testing
Using LoadRunner
Overview
Preparing the installable cloud application
Recording scripts
Parameterization and correlation
Replaying scripts
Using JMeter
Overview
Preparing the installable cloud application
Recording scripts
Parameterization and correlation
Modifying scripts
Replaying scripts
Debugging
Overview
Debugging with PowerServer Debugger
Preparations
Starting PowerServer Debugger
Running in debug mode
Debugging with Fiddler
Installing Fiddler
Configuring Fiddler
Configuring the PowerServer project
Running the PowerServer Web APIs and then Fiddler
Capturing HTTP(S) with Fiddler
Filtering the results
Inspecting the results
Analyzing the performance
Logs and unsupported features report
Deployment log
Unsupported features report
Web file download log
Web API request log
Debugging log in SnapDevelop
PowerServer logs
Debugging case studies
DataWindow related errors
Embedded SQL related errors
Error handling
Introduction
Session
How to capture session-related errors?
How to keep the Session ID valid while the user operates the application?
Transaction
How to capture PowerServer-specific errors such as Transaction Timeout?
Troubleshooting suggestions for database operation errors
Network
How to capture HTTP Errors that occasionally occur while the application is running
Troubleshooting suggestions for common network errors
Logging
How to set up the backend log to output the executed SQL
How to enable front-end logs
When multiple users are accessing the application, how do you know which user's operation caused the error?
Data type mappings
SQL Server data type mappings
ASE data type mappings
SQL Anywhere data type mappings
Oracle data type mappings
PostgreSQL data type mappings