1. damian jimenez
  2. PowerServer
  3. Tuesday, 10 January 2023 15:07 PM UTC

Hi 

i have two powerserver project, one for debuging (in local development machine W10 Powerbuilder 2022 Build 1892) and other for remote IIS server (Windows Server 2019) 
both project works ok in local develpoment machine, but when publish (with Snapdevelop) to remote IIS server (both site's ok: ClientApp and WebApp i mean up to date) and execute

i had try with authentication oauth, and works fine locally, but as the remote app did not work, I deleted the Oauth service configuration in a remote project, I thought that Beginsion's error was from Oath, but without authentication it gives me the same error
after create a CAL remotly, and publish the app (in server remote) : 

1. the URL download first CAL, and execute automaticaly -> OK

2.the CAL download Client App (when shows update.bmp) -> ok

3. Just for few seconds shows loading_ica.gif (when try to execute the app) and show this message

(shutdown windows firewall and i had the same result)

********* Error message after CAL download app client ******

Application terminated

Error: Session created failed Cause: found (http status code:302) (web Api:http//localhost:82/api/Serverapi/CreateSession)
*********************************

if i execute localhost:82/health-ui/ (where is currently running Powerserver) 
shows ok: connection config, network status, license status, the other are in red light but mrun for this test is ok.

in c:/inetpub/wwwroot/webapp/logging/logs/powerserver.log, i have

**************** log powerserver in IIS *****************

2023-01-10 11:56:43,965 ERROR Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.? [?] - MESSAGE: Health check EmailSslEnabledChecker with status Unhealthy completed after 0.0057ms with message 'Secure mail server configuration'
2023-01-10 11:56:43,965 ERROR Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.? [?] - MESSAGE: Health check HttpsEnabledChecker with status Unhealthy completed after 0.0362ms with message 'HTTPS enabled on PowerServer'
2023-01-10 11:56:43,966 ERROR Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.? [?] - MESSAGE: Health check EmailConfiguredChecker with status Unhealthy completed after 0.0168ms with message 'Mail configuration'
2023-01-10 11:56:43,968 ERROR Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.? [?] - MESSAGE: Health check EmailSendableChecker with status Unhealthy completed after 0.3027ms with message 'Mail sending function'
2023-01-10 11:56:43,968 ERROR Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.? [?] - MESSAGE: Health check AuthenticationHttpsChecker with status Unhealthy completed after 0.0223ms with message 'Secure authentication server (HTTPS) configuration'

**************************************

thanks

damian jimenez Accepted Answer Pending Moderation
  1. Tuesday, 24 January 2023 14:59 PM UTC
  2. PowerServer
  3. # 1

Thanks to everyone, thank you Francisco, from your comment, find the solution.

Before this error; I was making previous compilations of the project with application authentication, it had restored to the previous state where I did not use any authentication

I noticed that in the Powerserver authentication folder in IIS (remote server), after the publication from Snapdevelop. The Authentication.json file had a date prior to deploy, when editing it had this configuration.

"Powerserver: enableauthentication": True,
(I changed it to false) and when I executed it, I did not give more error message
[SESSION CREATED FAILED CAUSE: FOUND (HTTP STATUS CODE: 302)]]

Not satisfied with this, I thought you should be able to change from the Powerserver project.
Then I returned to the Powerserver project and .net Server, Advanced tab, click on check "Overwrite Server Settings (DB Connection, .net Server Listening Port, and License)" [Number 2 in Image]
I recorded and generated the compilation.
The Powerserver.json did not change (maintained the oldest date and remained in True)
In Client APP the Option of Rebuild was incremental, I changed it to full [Number 1 in image] and I generated the deploy again
I fail again when publish,

From Snapdevelop the authentication file. Json was fine (in false) but continued to observe that in the files generated in remote IIS was in True ..
Then generate a Publish Folder (local folder) [Number 3 in Image] and then I did the Publish on Web Server (IIS) [Number 4 in Image]
And there it was properly updated

There are several steps, there is possibly some of more, but I comment everyone may help other people
Thanks all again

Attachments (1)
Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 24 January 2023 17:23 PM UTC
Thanks Damian for this info. We will pass this to our product management team to see if there is some enhancement or bug fixes required for future versions.
  1. Helpful
  1. Monica Petersen
  2. Friday, 19 April 2024 22:09 PM UTC
Thanks Damian, this was the final hurdle I had before successfully deploying my app. After reading the health-ui recommendations, I went into the authentication.json file and changed enableauthentication to true. It didn't help, but after trying different settings on the security page, my error message stopped being "Failed to send the request" and started being "http status code: 302". After reading your resolution, I put enableauthentication back to false, and the app ran! Thanks for sharing :)
  1. Helpful
There are no comments made yet.
damian jimenez Accepted Answer Pending Moderation
  1. Tuesday, 10 January 2023 18:06 PM UTC
  2. PowerServer
  3. # 2

Thanks Armeen, yes, i was trying on windows server run CAL locally (before i had deployed in developer machine (windows 10) and send by FTP to web server IIS virtual Windows Server 2019)  in that case localhost works fine.
I had tried to run in other client machine (another Windows 10)  point to that server in URL (and replace localhost for his IP Address localhost:81 for 192.168.150.202:81)  and works OK too.

Thanks Francisco, sound like maybe, i will see IIS on W.Server


thanks for your fast  response ;) !!!

 

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 10 January 2023 18:08 PM UTC
You're very welcome. I didn't quite understand.... so you are saying the error is resolved now?
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 10 January 2023 16:07 PM UTC
  2. PowerServer
  3. # 3

Your Web API URL is wrong.  You can only use localhost when running the server and client locally on your dev machine.  When deploying to remote server you should be using domain name or static IP address.

Keep in mind that there may be other environment variables you need to adjust when you move a project from one server that is working (e.g. local server) to another server (e.g. remote server).  For example, database connection, Web API authentication (e.g. OAuth), license code, etc.  So it is recommended you have dedicated project object for each environment.

Comment
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 10 January 2023 15:53 PM UTC
  2. PowerServer
  3. # 4

Hi Damian,

Error: Session created failed Cause: found (http status code:302) (web Api:http//localhost:82/api/Serverapi/CreateSession)

HTTP 302 usually means redirection. Is IIS configured to use HTTPS redirection? Do you have HTTPS configured on the IIS instance?

 

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.