To replace the developer license before the Web APIs are compiled to DLLs, you will need to edit the license string in either the PowerBuilder or SnapDevelop IDE:
-
Go to the "Web APIs" tab of the PowerServer project.
-
Click on the "Remove" button of the "License settings" section. This will remove the PowerServer 2021 developer license (if any).
The license information will now be empty:
-
Now click on "Import from File" and import the text file with the production license code.
The production license has now been applied to this project.
You can now deploy your PowerServer project using the production license.
It is possible to switch between developer and production licenses. To revert back to the developer license, simply click the "Remove" button and click on "Auto Import".
-
Open the Web APIs project in SnapDevelop.
You can do this by clicking on the "Open C# Solution in SnapDevelop" button in the PowerServer toolbar.
This will open SnapDevelop.
-
In the Solution Explorer on the right, open the "Server.json" file. It should be under the "ServerAPIs" project.
The file should look similar to the following:
-
Replace the "LicenseKey" field with the name of the file without extension and replace the "LicenseCode" field with the contents of the file.
-
If the Web APIs were already running, you will need to restart it in order for the changes to be reflected.
-
Browse to the generated Web APIs location. If you are on the same machine as the PowerBuilder IDE that was used to deploy the project, you can see this location in the "Web APIs" tab of the PowerServer project.
-
Browse to the ServerAPIs folder.
The contents should look as follows:
-
Open the "Server.json" file in your text editor of choice.
-
Replace the "LicenseKey" field with the name of the file without extension and replace the "LicenseCode" field with the contents of the file.
-
If the Web APIs were already running, you will need to restart it in order for the changes to be reflected.