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

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

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

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.

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
ethar turky

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

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


strCo = "Provider=SQLOLEDB.1;Password=xxxx;Persist Security Info=True;User ID=xxxx;Initial Catalog=xxxx;Data Source=192.168.1"
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
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