1. VINOD NAIR
  2. PowerServer
  3. Tuesday, 17 October 2023 13:25 PM UTC

I have installed Powerbuilder 2022 R2 Build 2819 and deployed my applications and WebAPI. In the previous release, I was able to change the Web API URL by using the command "dotnet customizedeploy.dll -url=<url> as mentioned in the help file below.

https://docs.appeon.com/ps2022/Change_the_Web_API_URL_for_an_application.html 

With this new release, when I run the above command it does not recognize the URL parameter and outputs the following. 

The syntax of this command is:
dotnet CustomizeDeploy.dll -src=<source file> -dest=<destination file>
dotnet CustomizeDeploy.dll -encrypt=<string>
dotnet CustomizeDeploy.dll -encrypt=<string> -outfile=<output file>

How do I change the web api url with this new release?

VINOD NAIR Accepted Answer Pending Moderation
  1. Tuesday, 17 October 2023 19:21 PM UTC
  2. PowerServer
  3. # 1

Thanks Francisco. That worked. So we have 5 servers where we will be running 5 applications so I am guessing I will need to maintain 25 different files for this combination now. In the past, my script would just run the customizedeploy with appropriate url and I didn't have to maintain files. Is there a way to update the file apprun,json via script?

Comment
  1. Francisco Martinez @Appeon
  2. Wednesday, 18 October 2023 14:15 PM UTC
What script language do you use? Batch?
  1. Helpful
  1. Francisco Martinez @Appeon
  2. Wednesday, 18 October 2023 14:28 PM UTC
I couldn't find anything for Batch, but if your environment has PowerShell the following command will work:



(Get-Content .\apprun.json) -replace '"web_api": ".*"', '"web_api": "http://new url"' | Set-Content .\apprun.json



You could write this into a ps1 file and from the BAT script invoke PowerShell with the ps1 as argument
  1. Helpful
  1. VINOD NAIR
  2. Wednesday, 18 October 2023 17:41 PM UTC
Hi Francisco,



Thanks for your help. Since the API is running in "http:\\localhost:80\SA", I couldn't find a way to just replace the word "localhost" with the URL. So I used the below script. Would you happen to know how to just replace the word localhost in the text above with the URL



(Get-Content .\apprun.json).replace('localhost', 'URL') | Set-Content .\apprun.json
  1. Helpful
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 17 October 2023 14:26 PM UTC
  2. PowerServer
  3. # 2

Hi Vinod,

Starting from R2, the Web API URL is changed in the apprun.json file, which is located in the deployment directory:

 

Regards,
Francisco

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.