1. Ronnie Po
  2. PowerServer
  3. Wednesday, 11 May 2022 19:13 PM UTC

Hello,

Following the steps in

Tutorial 3: Hosting Web APIs in IIS (in-process hosting) - - PowerServer 2021 Help (appeon.com)

I have at least partially deployed my app's Web APIs to IIS. The PB client can successfully obtain a JWT token and can successfully call app.GetSessionID(). However, the app is unable to connect to SQL Anywhere using ODBC. The CONNECT returns -1. All of the required ODBC profiles are configured at the server. SSL is configured, and the Web APIs use port 5009. SQL Anywhere is running on the same server (for now).

Did I miss a step? Are there permissions that need to be granted to the .NET Core app to access the DB service?

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 May 2022 20:02 PM UTC
  2. PowerServer
  3. # 1

Do you have DSN setup in the 64-bit ODBC administrator (not 32-bit)?  Does the DSN test successfully?  Is the name correctly matching what appears in your applications.json file?  When you compiled the Web APIs, did you set platform to x64… I think it defaults to x86?

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 11 May 2022 20:37 PM UTC
Hi Ronnie .. Can you tell us more details on how you are publishing your Web API's and the IIS configuration on your deployment target machine is?
  1. Helpful
  1. Ronnie Po
  2. Wednesday, 11 May 2022 20:59 PM UTC
I'm publishing and deploying using the "File System" method. Remote server is Windows Server 2019. IIS is configured per the tutorial. Do I need to change any of the default settings of the Application Pool?
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 11 May 2022 21:00 PM UTC
No, you should not need to change any of the Application Pool settings.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 May 2022 23:25 PM UTC
  2. PowerServer
  3. # 2

Even if SQL Anywhere is on the same machine as IIS, you need to specify in the ODBC config that the SQL Anywhere is on another computer and you can use localhost or IP address for the host name.  Then it should work.  

Comment
  1. Ronnie Po
  2. Wednesday, 11 May 2022 23:41 PM UTC
Thanks for sharing the solution!
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 11 May 2022 23:45 PM UTC
Thanks for your help to find the solution! ;-)
  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.