Solved

Authentication error in ASP page

Posted on 2007-04-02
5
338 Views
Last Modified: 2012-06-27
Hi Experts,

I have changed my one of my server from windows 2000 to 2003 its running SQL 2000, All the link servers and the security accounts are some of my ASP pages are coming with the following error,

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

How can I check that where I'm going wrong, I can send you the code I'm using in the page and the other settings of my server, any help to trace out this problem will be much appreciated.

Many Thanks,
0
Comment
Question by:Impex
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:vjc2003
Comment Utility
If u havent done this already,
check connection string in the configs.
Have u enabled Windows and Sql server authentication for  the DB?

0
 

Author Comment

by:Impex
Comment Utility
The SQL is on windows and SQL authentication since I have installed the server, I was looking on Google and Microsoft acticles about this problem. All of them say the same thing like enabled Windows and Sql server authentication in security tab of the server which is already done.
0
 
LVL 8

Expert Comment

by:Julianva
Comment Utility
What account are you using to connect  from the asp page to sql server is it SQL auth or windows auth. the connectio string should be in the asp page. you need to check in sql enterprise manager that the windows account is created on SQL server

security - logins -

the error you are getting is a windows auth error , happen when you dont have a windows account login in SQL server.




0
 

Author Comment

by:Impex
Comment Utility
This is the connection string I'm using in ASP code,
string str="User ID=sa;Initial Catalog=SDXArchiver;Data Source=server1";

I have added an account in SQL which is DOMAIN\ADMIN and given in full control on all the data bases.
How can I configure my ASP file to use the domain admin account in order to get the information from server1.

Cheers!
0
 
LVL 2

Accepted Solution

by:
vjc2003 earned 250 total points
Comment Utility
For using windows authentication conn. string has to be like
connectionString="Initial Catalog=MyDb;Data Source=MyServer;Integrated Security=SSPI;"

Also you will have to configure IIS to run the application with DOMAIN\ADMIN account
It is a better idea to use a specific account for this and not an ADMIN account.

btw are your application and DB on different machines?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now