1. Sim Joo Pee
  2. PowerServer
  3. Monday, 16 January 2023 04:21 AM UTC

Hi All,

I am trying to Publish Web API. After using Snap Develop to publish, i copy the files to web folder,  C:\wamp64\bin\apache\apache2.4.54.2\htdocs\webapis

However, when i try to verify the web API, i couldnt. I get the output as attached. (Please view attachment)

Another question, is it only way to copy the published API files manually from local pc to web server?

Hope to hear from you guys soon. Thank you.

 

Attachments (1)
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 16 January 2023 05:15 AM UTC
  2. PowerServer
  3. # 1

Please follow the docs how to properly deploy the Web APIs for Apache Web server:  https://docs.appeon.com/ps2022/Hosting_Web_APIs_in_Kestrel.html

The only options for deploying to a remote Apache server is copy files over or you create Docker container.

Comment
There are no comments made yet.
Sim Joo Pee Accepted Answer Pending Moderation
  1. Wednesday, 8 February 2023 08:46 AM UTC
  2. PowerServer
  3. # 2

Hi Master,

  I encountered an issue, where i managed to bring up the web api services. And it is proxy server, different port on same pc. And after i shut down the service and reconnect back, it didnt work anymore. My application pop error "Session Creation failed" Failed to send the request...." 

I refer to this https://docs.appeon.com/ps2022/Session_creation_failed.html, but still doesnt help. Any one here, can give some hint? Thank you.

Comment
  1. Logan Liu @Appeon
  2. Wednesday, 8 February 2023 09:56 AM UTC
Hi Sim,

Please make sure the PowerServer Web API is accessible by browser first.

You can refer to this doc, it's written for IIS but it's similar for Apache when accessing the health-ui page.

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



If the Web API is already working well, but this "session creation failed" error still popping up, please show the screenshot of the error.

Regards, Logan

  1. Helpful
There are no comments made yet.
Sim Joo Pee Accepted Answer Pending Moderation
  1. Thursday, 9 February 2023 07:02 AM UTC
  2. PowerServer
  3. # 3

Hi

Thanks.  i had tried it. But, i get below error. Can you help to give some hints on what is going on with this? I am totally new to this. Thanks in advance.

**Note: i was able to connect, but after i rebuild/deploy, it didnt work anymore. I rebuild/deploy because i have some change in my application.

 

Unable to connect

Firefox can’t establish a connection to the server at 172.20.1.24:5099.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 9 February 2023 17:54 PM UTC
Can you access 172.20.1.24 from your Web browser? If no, then your IP address is incorrect.

Have you deployed the Web APIs to port 5099 on this 172.20.1.24 machine?

These are the two most common mistakes we see people make that either the URL is wrong or they didn't deploy the Web APIs to the remote machine.
  1. Helpful
  1. Sim Joo Pee
  2. Friday, 10 February 2023 02:22 AM UTC
Hi Armeen,

Guess what, today, i am able to load my app without the error i reported yesterday. I didnt do anything. This is getting crazy now, it seemed work intermittently. Any idea why could caused this?

[Armeen]Can you access 172.20.1.24 from your Web browser? If no, then your IP address is incorrect.

[Simjoo] I can access it from my browser (See picture attached).



[Armeen] Have you deployed the Web APIs to port 5099 on this 172.20.1.24 machine?

[Simjoo] Yes, it is deployed. See below



C:\wamp64\www\publish>dotnet ServerAPIs.dll --urls "http://172.20.1.24:5099"

info: Microsoft.Hosting.Lifetime[14]

Now listening on: http://172.20.1.24:5099

info: Microsoft.Hosting.Lifetime[0]

Application started. Press Ctrl+C to shut down.

info: Microsoft.Hosting.Lifetime[0]

Hosting environment: Production

info: Microsoft.Hosting.Lifetime[0]

Content root path: C:\wamp64\www\publish
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 10 February 2023 06:25 AM UTC
I wonder if it is some instability in Apache as reverse proxy for the Web APIs. Try using NGINX see if that resolves the problem and follow this doc carefully: https://docs.appeon.com/ps2022/Hosting_Web_APIs_in_Kestrel.html
  1. Helpful
There are no comments made yet.
Sim Joo Pee Accepted Answer Pending Moderation
  1. Friday, 10 February 2023 02:24 AM UTC
  2. PowerServer
  3. # 4

Hi Armeen,

  As attached is the screenshot on the access result. Thank you.

Attachments (1)
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.