Tuesday, June 24, 2008

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

Hello all,



I am using sqlserver and visual studion 2005. And i am using SqlClient to connect with sql server and vs framework. My connectionstring is

SqlConnection sqlCon = new SqlConnection("Data Source=(local);user id=sa;password=;Initial Catalog=testUtilities");

When trying to open connection the following error message is shown

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

If anyone knows the exact reason please help me.

Thanks in Advance
John Sakaria

3 comments:

Shijo Baby said...
This comment has been removed by the author.
Teena said...

I also encountered this type of error

You just open SqlServer enterprise manager. And take Sqlserver properties. Take securities Tab

Under that check sql and windows authentication

Teena

Anonymous said...

Thanks Teena from 2008. You post helped me in 2014. :)