System.Data.SqlClient.SqlException: 'A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The operation completed successfully)'
I'm trying to connect to SQL Server 2008 R2 database with a UWP APP.
- Remote Access is enabled
- Firewall rules are in place
- Target version is Windows 10 Fall Creators Update(10.0; Bulid 16299
- Min version is Windows 10 Fall Creators Update(10.0; Bulid 16299
- Package.appxmanifest is setup with
- internetClient
- internetClientServer
- privateNetworkClientServer
- enterpriseAuthentication
Code:
using System.Data.SqlClient;
const string ConnectionString = "SERVER = XXXServer; DATABASE = XXXDatabase; USER ID = XXXUser; PASSWORD = XXXPass";
using (SqlConnection sqlConn = new SqlConnection(ConnectionString))
{
sqlConn.Open();
}