SQL Server could not find a login matching the name provided I have SQL Serer 2012 up and running. I created a new login (SQL Server authentication with password expiration, requires change, etc. turned off).

I can start SQL Server Management Studio as the user. But when I try to connect in code I get the error 'could not find a login matching the name provided'. I know the code works because it can connect to another instance on the same machine.

But the name is there, and I'm actually logged in as that user.

Note, I cannot use integrated security either, just the same error message.

What's wrong? Many thanks.
I had the wrong port number. There was a third database instance with this port....

so it seems when you connect using 'SERVER\INSTANCE,port' it completely ignores INSTANCE if you specify port and instead of saying you have the wrong instance you get user not found.

thanks.