What settings will be deployed to the solution

Every time when the PowerServer project is built and deployed in the PowerBuilder IDE, some settings will be deployed to the PowerServer C# solution. You will need to be aware what settings will be updated, because if you have directly made changes to these settings in the solution, the changes might be lost when the project is built and deployed.

PowerServer project settings

Will be updated to

By

Overwrite strategy

Security page > Auth Template

UserExtensions project > Authentication

Build

When selecting a different authentication template, you will be prompted whether to overwrite the existing authentication.

Deploy page > Basic tab > Port number for local Kestrel

ServerAPIs project > Properties > launchSettings.json > port number in "applicationUrl"

Note: this port number will be used in the development hosting environment.

    "ServerAPIs": {
      ...
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://0.0.0.0:5000/"
    }

Deploy

Determined by the "Overwrite server settings (DB connection, .NET server listening port, and license)" option.

When the option is selected, the port number in "applicationUrl" will be updated, otherwise it will not be changed.

Deploy page > Basic tab > Web API site URL

The URL will be deployed to the client app > apprun.json file

{
    "deployment_urls": {
        "launcher": "CloudAppPublisher/CloudAppInstall 22.0",
        "runtime": "CloudAppPublisher/runtime/22.1.0.2670",
        "web_api": "http://localhost:5099"
    }
}
Deploy Overwritten all the time.

Deploy page > Basic tab > License settings

UserExtensions project > UserConfig.json > "PowerServer" > "LicenseKey" and "LicenseCode"

  ...
  "PowerServer": {
    "LicenseKey": "DSCE-IHFG-CHEI-51H3-G0BE",
    "LicenseCode": "eyJQYXlsb2FkIjoiVT*****",
    "EncryptedSensitiveData": false,
    ...
    },

Deploy

Determined by the "Overwrite server settings (DB connection, .NET server listening port, and license)" option.

When the option is selected, both "LicenseKey" and "LicenseCode" will be updated, otherwise they will not be changed.

Database page > Advanced tab > the current DB connection profile

UserExtensions project > AppConfig > AppConfig.json

{
  "POWERSERVER_ENVIRONMENTTYPE": "Default",
  "ConnectionStrings": {
    "AppConfig": "<appconfig connection string>"
  }
}

Deploy

Overwritten all the time.

Database page > Advanced tab > database caches configured in all DB connection profiles

UserExtensions project > AppConfig > Applications.json or Applications.[DBConnectionProfile].json > "Connections" > "Default" > [cache name]

("Default" refers to the default cache group.)

  ...
  "Connections": {
    "Default": {
      "sales": {
        "ConnectionType": "Odbc",
        "OdbcName": "PB Demo DB V2022R2",
        ...
      }
    }
  }

Deploy

Determined by the "Overwrite server settings (DB connection, .NET server listening port, and license)" option.

New caches will be added regardless if this option is selected or not.

If there are multiple caches, there will be multiple [cache name] blocks. When this option is selected, and if a cache with the same name is configured in the Database page, the corresponding [cache name] block will be overwritten; if there is no cache with the same name in the Database page, the [cache name] block will not be overwritten. When this option is not selected, all [cache name] blocks will not be overwritten.

By the way, if you create new cache groups (besides "Default"), these new cache groups will not be overwritten regardless if this option is selected or not.

Database page > Advanced tab > transaction-to-cache mappings configured in all DB connection profiles

UserExtensions project > AppConfig > Applications.json or Applications.[DBConnectionProfile].json > "Applications" > [app name] > "CloudTransactions" > [transaction name]

{
  "Applications": {
    "salesdemo_cloud": {
      "CloudTransactions": {
        "sqlca": {
          "CacheName": "sales"
        }
      },
      ...
    }
  },
}

Deploy

Determined by the "Overwrite server settings (DB connection, .NET server listening port, and license)" option.

New transactions will be added regardless if this option is selected or not.

If there are multiple transaction objects, there will be multiple [transaction name] blocks. When this option is selected, and if a transaction object with the same name is configured in the Database page, the corresponding [transaction name] block will be overwritten; if there is no transaction with the same name in the Database page, the [transaction name] block will not be overwritten. When this option is not selected, all [transaction name] blocks will not be overwritten.