Solved

Authentication error in ASP page

Posted on 2007-04-02
5
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:vjc2003
ID: 18836086
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
ID: 18836137
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
ID: 18836340
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
ID: 18838093
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
ID: 18841298
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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.

739 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