I got this error (See attachment)
Application terminated.
Error: Session not created. Please create a session using
BeginSession. (Web API:
http://localhost:5099/api/ServerApi/ConnectAndCreateTransaction)
Note: I had tried this link: Trying powerserver from powerbuilder 2022 (appeon.com)
But it did not work.
This option is generally used to configure external authentication (for example through OAuth), so that no operations can be performed unless the user has properly authenticated. If you're not making use of this external authentication, then there is no need to have the "Begin session by code" option active and you can disable it. After disabling it, this error should go away
Regards - Francisco
In my case is the same app C/S and Powerserver, may be is your case Pascal
it was working OK without authentication, but when i`m add this configuration get the same error
( im my case add Oauth Server)
i did step by step the documentation (https://docs.appeon.com/ps2022/OAuth_client_app.html ) [1]
--------------------------------------------------------------------------------------------------------------------------------
THANKS TO Chris Pollach @Appeon AND Francisco Martinez @Appeon previous comments here i add this :
--------------------------------------------------------------------------------------------------------------------------------
In my case is the same app C/S and Cloud, then i change step 4. (1) add an IF Clause in open() event in application object
IF IsPowerserverApp() THEN
[....HERE THE CODE https://docs.appeon.com/ps2022/OAuth_client_app.html Scripts step 4 ...]
//Authorization
...................
ELSE
IF getsessionid ( ) = "" THEN ll_return = beginsession ( )
.....
END IF
with this, when is C/S execute beginsession() manually wich is necesary when "Begin session by code" is checked in additional properties (like Francisco said before )
with this change, works ok in Client/Server and Cloud Powerserver
I hope it works for you Pascal, regards