?
Solved

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

Posted on 2007-10-19
11
Medium Priority
?
376 Views
Last Modified: 2012-05-05
I have been working with classic ASP for a long time and here is how I create the connection string
From the database Security, Logins, I create a new user name like 'Testuser' and use SQL authenticate and enter the password like 'test'. Then on the global.asa page, I create a connectiong string like this
Application("Agenda_ConnectionString") = "DRIVER=SQL Server;SERVER=TestServer;UID=Testuser;DATABASE=Meeting;Pwd=test;"
            Application("Agenda_ConnectionTimeout") = 15
            Application("Agenda_CommandTimeout") = 30
            Application("Agenda_CursorLocation") = 3
            Application("Agenda_RuntimeUserName") = "Testuser"
            Application("Agenda_RuntimePassword") = "test"

I have a new sql database and I follow the same procedure to create the connection string, but this time I keep getting the error message
Login failed for user 'Testuser'. Reason: Not associated with a trusted SQL Server connection.
Please help. Thanks
0
Comment
Question by:CochiseCounty
  • 7
  • 3
11 Comments
 
LVL 25

Expert Comment

by:kevp75
ID: 20113787
did you make sure to add that user to the second database?
0
 

Author Comment

by:CochiseCounty
ID: 20113822
i added the user Testuser, it shows up under Logins
0
 

Author Comment

by:CochiseCounty
ID: 20113824
when I run sp_helpuser, the user Testuser also shows up
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:third
ID: 20114148
0
 

Author Comment

by:CochiseCounty
ID: 20114531
i tried all that, I am using SQL Server login anf had the SQL Server and Windows checked. Still not working
0
 

Author Comment

by:CochiseCounty
ID: 20130818
One more thing, I have SQL server 2000 SP4 installed on my server, not sure if this causes the problem
0
 
LVL 30

Expert Comment

by:third
ID: 20139382
Are you sure you are pointing to the correct datasource? Do you have multiple instance of SQL Server installed? Have you tried integrated security instead (just for testing)?
0
 

Author Comment

by:CochiseCounty
ID: 20139553
I think there are some inconsistencies in the Log on user account...
When I checked the Security in the SQL Server Properties, under Startup service account, I saw 'System  account' checked, so I ask the network guy to change it 'This account', so he changed it to a domain account with a password. But my connection string still gives me the same error message
Now, when I go to the Services, I saw the service MSSQLSERVER, under Log On, it uses the same domain accout as in the Security, but the service SQLSERVERAGENT, under Log on, the Local System account is checked, I am not sure if this causes the problem. I already emailed the network guy again to ask him to use the same domain account as using with the MSSQLSERVER and the Security. After he does that, I will check to see if my connection string work and let you know. Thanks for your help
0
 

Author Comment

by:CochiseCounty
ID: 20160335
OK, the network guy reinstalled the SQL Server 2000 with SP4, my connection string now works fine with the Intranet sites, but not the Internet, the error message I am getting now is
SQL server does not exists or access denied
0
 
LVL 30

Accepted Solution

by:
third earned 1000 total points
ID: 20160475
when connecting from internet, you need to update the datasource to the public url/ip of your server.
0
 

Author Comment

by:CochiseCounty
ID: 20163613
How do I do that? thanks for your help.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 8 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question