1. mike S
  2. PowerServer
  3. Wednesday, 7 December 2022 18:23 PM UTC

Getapplication().getpowerserverurl( )   results in:

 

https://myappurl.cloudapp.azure.com:5009/myappapi

add on the connect/token results in:

https://myappurl.cloudapp.azure.com:5009/myappapi/connect/token

 

when deployed to a container app, this works great (different url and different port, but that all comes from the getpowerserverurl() )

When deployed to IIS  (VM in cloud server)  i get: 404 not found when trying to access the jwt token api.

Before i added in the JWT auth (no auth), the deployed app worked fine on IIS.

 

 

 

Accepted Answer
mike S Accepted Answer Pending Moderation
  1. Monday, 12 December 2022 17:35 PM UTC
  2. PowerServer
  3. # Permalink

I had the PATH set to the site name in the Web api URL under the .net server tab.  (Server setup | .NET Server | Basic - Web API URL)

After clearing the path setting, it worked.

 

Comment
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Monday, 12 December 2022 05:37 AM UTC
  2. PowerServer
  3. # 1

Hi Mike,

It seems to be caused by the deployment differences. You can either use Web API Tester in SnapDevelop or other tools (e.g.:postman) to make the API test easier. Could you access the connect/token API without "myappapi/" in the URL path? 

Do you have another reverse proxy that may lead to these differences?

Which authentication template are you using? Is it a built-in JWT/OAuth authentication server or a separate one?

Is it working well in your local IIS? What are the main differences between your cloud VM and local IIS?

Regards, Logan

Comment
  1. mike S
  2. Monday, 12 December 2022 15:23 PM UTC
using the built-in JWT authentication server



"Could you access the connect/token API without "myappapi/" in the URL path?" is this supposed to work that way? I have not tried it that way, but i'm sure it won't work due to the way i have it setup in my IIS server (directory location). I am not at all clear the actual location of deployed built in server as i do not see any subdirectories for that.



I don't run it using local IIS



  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.
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.