The scenario: SQL Server 2014 Developer with default settings and connection port (1433), C# with Entity Framework 6.
Using SQL Server with EF6 in my C# app, the following connection string works like a charm:
Data Source=localhost;Initial Catalog =...
But this connection string fails:
Data Source=localhost,1433;Initial Catalog =...
Yes, this is the correct port.
Snooping around in the configurations of SQL Server I found a solution by activating the TCP/IP protocol, but, since it's the default port, isn't it supposed to work just like the other connection string without the port? Even with the TCP/IP deactivated (which is the default)?
Thanks!
,, not a:.named pipesin the first instance, but in the second instance since you're specify a port it's forcing it to usetcp/ip.localhostby itself worked because a different protocol was used, most likely Shared Memory. Only Shared Memory is enabled by default, which allows connections only from the local machine ie localhost.