1. Luis Duran
  2. PowerServer
  3. Wednesday, 3 April 2024 23:04 PM UTC

We have 2 web servers to host the App, launcher and runtime and we have 2 different servers to host the PowerServer Web API. In the 2 web servers we setup IIS to work as a load balancer to redirect the calls to the API servers. Everything is working until two weeks ago, we were asked to add extra security to the 2 Web Servers, so only authenticate users can access and see these servers. We, try to implement first windows authentication but APPEON support team already told us that the cloudlauncher do not work with this type of authentication. So, we move to the cookie's authentication. I setup in IIS the forms authentication to redirect the calls to a Loging page, and after the user enter their credentials, we are able to catch the cookie and pass it to the cloudlauncher. But right now, it looks like the application itself is returning an error when it's trying to connect to the PowerServer API. 

In the application we are starting the session manually because we have the JWT Auth enable. and we have this code:

long ll_return
ll_return = Beginsession()
If ll_return <> 0 Then
Messagebox("Beginsession Failed:" + String(ll_return), GetHttpResponseStatusText())
End if
Catch ( Throwable ex)
MessageBox( "Throwable", ex.GetMessage())
End Try


And this is the error we are getting:


Any help will be very much appreciated. 

Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Sunday, 7 April 2024 05:28 AM UTC
  2. PowerServer
  3. # 1

Hi Luis,

Assume you have implemented cookie validation via Support cookie validation - - PowerServer 2022 R3 Help (appeon.com)When JWT Auth is enabled, before sending the HTTP request to get the JWT token, do you have any code to set the cookie to the HTTP Client?


ls_Cookie = GetApplication().GetHttpRequestHeader("cookie") // Get Cookie.
lhc_client.SetRequestHeader("cookie", ls_Cookie) //Set Cookie to HttpClient.

You can use Fidder or other tools to capture the HTTP tranfic, then verify whether there is valid cookie in the HTTP HEADER.
Refer to: Debugging with Fiddler - - PowerServer 2022 R3 Help (appeon.com)

Regards, Logan

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.