Reason: Not associated with a trusted SQL Server connection.

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
 
N

Norman Yuan

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top