I'm having problems in connecting a .NET Core 1.1 application to a remote SQL Server, but only on my Mac because on Windows everything works well.
Said that it's not my application and I'm only trying to make it working, this is my connection string on appsettings.Development.json:
"ConnectionStrings": {
"MesDatabase": "Data Source=x.x.x.x\\BLABLA,49331; Initial Catalog=DBNAME; Uid=sa; Pwd=blablabla"
}
This is the error I get opening the connection:
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: 25 - Connection string is not valid)
I can't access the server, any idea? I'm almost sure that it's a stupid error on connection string but I cannot find it.
I also tried to create a .udl file on Windows, editing it with correct connection data and taking the resulting connection string opening it with notepad. Nothing, always "connection string is not valid" on Mac.
tcp:x.x.x.x,49331fails wheretcp:x.x.x.x\BLABLA,49331works? Because I'd find that very surprising. SQL Server Browser may not be running or not reachable, but in that case instance names aren't useful anyway. - Jeroen Mostert