1. Kevin Ridley
  2. PowerServer
  3. Friday, 18 March 2022 12:27 PM UTC

Working on a POC for a client.  It works on localhost, but when we deploy to a remote MS Server 2019 w IIS, we are getting a session create error.  Followed the instructions in the documentation and we're able to deploy from PB 2021.  The site looks good on the server and the client seems to download fine, but when it tries to start up we get the following error:

PowerBuilder application execution error (R0221)
Application terminated.
Error: Session creation failed.
Cause: Failed to send the request. (Web API:
http://myserver:81/api/ServerApi/CreateSession)

Thanks,

Kevin

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 18 March 2022 14:57 PM UTC
  2. PowerServer
  3. # 1

Adding to what Francisco said, there are 3 common reasons for the session creation to fail.

1. You forgot to reconfigure the URL in the Web API tab of the project object and re-deploy.  It is probably still pointing to localhost.  Alternatively, you can reconfigure the URL after the fact using the command line utility: https://docs.appeon.com/ps2021/Change_Web_API_URL.html

2. You forgot to start the Web API server.

3. The Web API URL is incorrect or not accessible from outside the firewall.

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 18 March 2022 22:55 PM UTC
Yes, you need to compile and deploy the generated C# project. You can use any C# IDE, but I recommend SnapDevelop to keep things simple.

I assume your are deploying the Web APIs to IIS? If yes, important you follow this section of the docs step-by-step: https://docs.appeon.com/ps2021/Hosting_Web_APIs_in_IIS.html
  1. Helpful 2
  1. Kevin Ridley
  2. Thursday, 24 March 2022 17:56 PM UTC
Finally got the web api's published using snapdev. I needed to have the domain\userid in the userid field. Now I seem to have 2 problems. First, now when I do "server/website" in the browser I get a 500 error. The other possible issue is I don't see the 2 services: w3wp.exe and conhost.exe . Seems like maybe they only get started when the client is launched, so might not be an issue. I need to resolve the 500 error for sure though.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 24 March 2022 18:22 PM UTC
Please separate out issues into new posts. Once you make new post about 500 error, I will give you some suggestions.

  1. Helpful
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Friday, 18 March 2022 14:12 PM UTC
  2. PowerServer
  3. # 2

Hi Kevin,

Are the Web APIs running and accessible on "http://myserver:81"? If not, please use this tutorial as a guide.
Also, this will help you change the Web APIs URL on the Cloud Application without having to rebuild.

Hope this helps.

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.