Hi Deepak,
This ASA database connection_authentication option can be set for an individual connection only. But PowerServer is using short-lived connections by default (refer to: Connection differences - - PowerServer 2022 R2 Help (appeon.com)), so the connection-related options will not work in the other automatically created database connections.
There are two workarounds:
1) Add InitString in the ASA connection string.
Open the generated C# solution, Find UserExtensions -> AppConfig -> Applications.json
Edit the value of OtherOptions, e.g.:
"OtherOptions": "InitString=\"SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=Appeon;Application=MyApp;Signature=123'\"",
{
"Applications": {
"retrievedemo": {
"CloudTransactions": {
"sqlca": {
"CacheName": "pbdemo"
}
},
"Transaction": {
"Timeout": 120,
"TransactionException": true
},
"Session": {
"Timeout": 3600
},
"Request": {
"Timeout": 3600
},
"RunMode": 0,
"MaxSPCache": 50
}
},
"Connections": {
"Default": {
"pbdemo": {
"ConnectionType": "Odbc",
"OdbcName": "PB Demo DB V2022R2",
"OdbcDriver": "SqlAnywhere",
"UserID": "dba",
"Password": "s",
"CommandTimeout": 30,
"SecurityOptions": null,
"OtherOptions": "InitString=\"SET TEMPORARY OPTION CONNECTION_AUTHENTICATION='Company=Appeon;Application=MyApp;Signature=123'\"",
"DynamicConnection": false
}
}
}
}
Please notice that OtherOptions values will be overridden by default when you deploy the PowerServer project next time. You can go to PowerServer project - Build - Basic - Web APIs, and uncheck Overwrite server settings.
Maybe you can also edit InitString in the ODBC configuration. E.g.: InitString SqlAnywhere 12 Authentication in ODBC - Stack Overflow
2) Use long-running connections if you don't have too many users in this application. It will work similarly to the native PB app but may occupy more database connections on the Server. Enabling long connections - - PowerServer 2022 R2 Help (appeon.com)
Regards, Logan