Reason: Not associated with a trusted SQL Server connection.

  • Thread starter Thread starter Sehboo
  • Start date Start date
S

Sehboo

My database is running on a seperate machine and my connection string
is
"user id=cc;data source=Custom;initial catalog=Dev;password=cc". I
backed and restored the database on my local machine and changed the
connection string to this: "user id=cc;data source=(local);initial
catalog=Dev;password=cc".

But now when I run my asp.net application, I get this error:
Login failed for user 'cc'. Reason: Not associated with a trusted SQL
Server connection.

Can somebody please tell me what I need to do?

thanks
 
It is obviously the SQL Server's security mode is set to Windows Integrated
Authentication mode only (it is default installation setting). If you want
to log into a SQL Server with username/password, you must enable the SQL
Server's mixed security mode. You may also need to learn how to give a login
user access/permission to SQL Server objects (table/view/sp...) before your
application could run as expected.


It looks like you need a bit study on SQL Server security topic.
 
Back
Top