I’m unable to connect to the local SQL Server with
connectionString="data source=.;Initial Catalog=TestDB;Integrated Security = True "
which gives the error message "Login Failed for PCName\UserName"
However, I am able to connect with this connection string
connectionString="data source=.;Initial Catalog=TestDB;User Id=sa;Password=abc;"
Why is it that I am unable to connect to the Local Server with Integrated Security = True?
I was under the impression that User Id and Password have to be specified for Remote connections.
Looks like you not have access rights to access local sql server under domain/windows account
Even if you installed the Sql Server you have to explicitly specify the accounts which have rights to connect to sql server and who will be sysadmin on this server except sa.