1. Teresa MacDonald
  2. PowerServer
  3. Monday, 22 November 2021 19:15 PM UTC

I have migrated my PowerBuilder application to PowerServer 2021. I have been able to deploy to a Cloud test environment. My application starts up, but I have been unable to log in. I use an INI file to create the connection to the database. I have ensured that the Applicaiton.json has the appropriate connection information as well. I haven't figured out how the connection is established in this new version; this isn't working.

I can connect to the database using SQL Management and have a valid ODBC connection created. 

Fiddler debugging information from the "POST /api/ServerApi/ConnectAndCreateTransaction HTTP/1.1" call:

{"version":"1.0","requestid":"F671467E-C493-4409-AAE5-9BC9D05B4CFB","appname":"perfser_cloud_1","session":{"errcode":0,"errmsg":null,"sessionid":"37A0CC0B-5E82-44EC-AE7F-FDB94111E465"},"type":7,"transaction":{"sqlcode":-1,"sqldbcode":-1,"sqlerrtext":"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)","sqlnrows":0,"sqlreturndata":null,"transactionid":null},"content":{"serverconfig":{"delimitidentifier":"no","ojsyntax":null,"caseconversion":0,"dbms":null}},"namespace":"Perfser_cloud_1"}

I am new to ASP.net development/deployment.

Any advice? Or can anyone point me to some documentation.

Thank you,

Teresa

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 22 November 2021 19:44 PM UTC
  2. PowerServer
  3. # 1

Hi Theresa,

First of all, PowerServer is not client/server.  The database connection string is done in the C# Web API project... specifically the applications.json file.  The connection string in your INI has no affect.  

Secondly, for SQL Server database you cannot use ODBC... you must use the native driver, which is automatically incorporated into the Web API project.  So basically, you do not need to setup ODBC DSN.

I recommend you spend time reading the DB configuration guide: https://docs.appeon.com/ps2021/working_with_database_connections.html

Best regards,
Armeen

Comment
There are no comments made yet.
Teresa MacDonald Accepted Answer Pending Moderation
  1. Monday, 22 November 2021 19:26 PM UTC
  2. PowerServer
  3. # 2

Yes. Everything is on one machine.

Comment
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Monday, 22 November 2021 19:22 PM UTC
  2. PowerServer
  3. # 3

Hi Teresa,

Is the Database accessible from the machine hosing the Web APIs?

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.