Avatar of ethar turky
ethar turkyFlag for Saudi Arabia asked on

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

Hi,
i am getting this error
when i run a sample asp page ( from web server to connect db server )
Login failed for user 'xxxx'. Reason: Not associated with a trusted SQL Server connection.
I am 100% sure about Sql server and Windows" option for authentication is selected.



also I can login with same account using query analyzer from web server as well as odbc.
ASPMicrosoft SQL Server

Avatar of undefined
Last Comment
ethar turky

8/22/2022 - Mon
jaanth

What connection string is your ASP page using to connect to the database?
brad2575

If you are using a connection string that is not using windows authencitation, I had this problem before as well and you have to go into the SQL server properties and under permissions have it allow windows authencitation and connect using a string (can not remember the exact spot this is at right now but I can find it at work tomorrow).

This is a setting you have to set in the SQL server though.
third

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER
ethar turky

after doing restart for both servers i can't access it through odbc or QA.


CS:
strCo = "Provider=SQLOLEDB.1;Password=xxxx;Persist Security Info=True;User ID=xxxx;Initial Catalog=xxxx;Data Source=datacenter"


OR

strCo = "Provider=SQLOLEDB.1;Password=xxxx;Persist Security Info=True;User ID=xxxx;Initial Catalog=xxxx;Data Source=192.168.1"
ASKER CERTIFIED SOLUTION
ethar turky

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question