question

BrandonYen-4235 avatar image
0 Votes"
BrandonYen-4235 asked AryaDing-MSFT edited

UWP app connection to remote sql server database

Hello,

I am trying to connect to a remote database with a UWP app, but haven't been successful. The connection string that I am using is: "Data Source=XXX.XXX.XX.XX\ETI; Initial Catalog=ETI_Analyzer;
Integrated Security=false; User Id=XXXXX; Password=XXXXXXX".

I can successfully connect to a local database, as well as connect to the remote database through SSMS.

The firewall has been configured to allow sql server and sql server browser. I have also tried turning the firewall off on both computers.

I have enabled the internet client/server, internet client, and private networks client/server in the package.appmanifest file. The minimum targeted version is the Fall Creators Update.

I have attached the error message that I receive after the connection times out: 89559-error-message.png


Thank you.

sql-server-generalwindows-uwp
error-message.png (13.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AryaDing-MSFT avatar image
0 Votes"
AryaDing-MSFT answered AryaDing-MSFT edited

Hi,

Welcome to Microsoft Q&A!

You need to add the enterpriseAuthentication capability in your Package.appxmanifest.

 <uap:Capability Name="enterpriseAuthentication"/>

If the question is still not resolved, please read this document to ensure correct conforguration.



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.