1. Antony Xavier
  2. PowerServer
  3. Friday, 8 December 2023 06:44 AM UTC

Hi Gurus,

While try to invoke Powerserver cloud url , am getting the following error :-

---------------------------
PowerBuilder application execution error (R0221)
---------------------------
Application terminated.

Error: Session creation failed.
Cause: Not Found (HTTP status code: 404). (Web API: http://99.9.99.195/MyApp_cloud/api/ServerApi/CreateSession).
Learn more at: https://docs.appeon.com/ps/troubleshooting_guide/Session_creation_failed.html
---------------------------
OK
---------------------------

I had gone thru the documentation and change the web.config, but same error am getting

<handlers>
        <add name="aspNetCore" path="/99.9.99.195/MyApp_Cloud_API/api" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
        <add name="aspNetCore2" path="/99.9.99.195/MyApp_Cloud_API/health-*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> 
<add name="aspNetCore3" path="/99.9.99.195/MyApp_Cloud_API/connect/token" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>

Can you suggest!

Regards

Antony Xavier

Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Friday, 8 December 2023 15:17 PM UTC
  2. PowerServer
  3. # 1

Hi Antony,

A 404 error means there was nothing found at the end of the URL you provided. Most likely the URL you're using for your Web API in your PS configuration is not the URL where they are hosted. Also, your handlers

 <add name="aspNetCore" path="/99.9.99.195/MyApp_Cloud_API/api" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />

should not include the server's IP unless that IP is part of the path, such as http://<your server's IP or domain name>/99.9.99.195/MyApp_Cloud_API/

So, most likely what you want is:

<add name="aspNetCore" path="/MyApp_Cloud_API/api" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />

You should verify that you're getting the API's URL correctly. You can check by going to the URL where you think you published them and accessing that URL in a browser. If the URL is correct you should see the following:

 

This screen means you reached the Web APIs correctly. Getting a 404 Not Found error means your URL is not correct.

If you have an IT team I suggest you have them help you get your Web API's URL

 

Regards,
Francisco

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 8 December 2023 16:19 PM UTC
Adding to what Francisco said, did you deploy the Web APIs to the server? A lot of times when we see 404 error of the Web API this is the reason.
  1. Helpful
There are no comments made yet.
Antony Xavier Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 09:09 AM UTC
  2. PowerServer
  3. # 2

Hi Armeen,

After build the cloud app, where I have to copy the files/folder which build in 'Web API solution Location' during cloud deployment, Please guide .

Am using port 81 and create a new website

 

 

Regards

Antony

Comment
  1. Francisco Martinez @Appeon
  2. Tuesday, 12 December 2023 14:40 PM UTC
Are you able to see the Welcome Screen by going to the <url>:81 address?
  1. Helpful
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.