Web Server forum
Back To The Forum Home!Search!Private Messaging System

This is Interesting: Free IT Magazines Now Free shipping to   
Web Server Talk Web Server Talk > Free Databases support forum > Microsoft SQL server > SQL Server Connection > Slightly Different Login failed for user 'sa'




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Slightly Different Login failed for user 'sa'  
examnotes


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-04 05:36 AM

I am trying to connect to a SQL Server 2000 database, running on Windows Ser
ver 2003, from my development PC, running Windows XP Pro, using ASP.NET. My 
ASP.NET application runs fine until I try to connect to the database, at whi
ch point I get the followin
g error message:

----------------------------------------------------------------------------
--------------------------------
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server
 connection.
Description: An unhandled exception occurred during the execution of the cur
rent web request. Please review the stack trace for more information about t
he error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user
 'sa'. Reason: Not associated with a trusted SQL Server connection.
----------------------------------------------------------------------------
--------------------------------

The SQL Server is set to use SQL Server and Windows Authentication, and I ha
ve a vaild username & password.

If I copy the files onto the deployment server, running Windows Server 2003 
and IIS 6.0, without making any changes, the application can connect to the 
SQL database without any problems. All 3 machines are running on the same do
main.

This is where it gets interesting. I have a Windows VB.NET application which
 connects to the same SQL database as the ASP.NET application. The Windows a
pplication uses exactly the same connection code, including username and pas
sword, as the Web applicati
on. The Windows application can connect to the SQL database without any prob
lems.

Does anyone have any ideas why this might be happening and how I might solve
 this problem?

Thanks in advance,
Alistair Gillespie





[ Post a follow-up to this message ]



    RE: Slightly Different Login failed for user 'sa'  
Kevin McDonnell [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-04 03:36 PM

What does your connection string look like?

Thanks,

Kevin McDonnell
Microsoft Corporation

This posting is provided AS IS with no warranties, and confers no rights.








[ Post a follow-up to this message ]



    RE: Slightly Different Login failed for user 'sa'  
examnotes


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-29-04 12:34 AM

I have changed the username and taken the password out for security.

data source=BECKS;initial catalog=TheNAB;user id=sa;password=

I have tried adding: Trusted_Connection=Yes and it makes no difference.

Thanks again,
Alistair





[ Post a follow-up to this message ]



    RE: Slightly Different Login failed for user 'sa'  
Kevin McDonnell [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-29-04 05:35 PM

Verify that you can connect using the same username and password using
Query Analyser.

If this fails, then odds are you changed the security, but didn't restart
SQL Server service.

Thanks,

Kevin McDonnell
Microsoft Corporation

This posting is provided AS IS with no warranties, and confers no rights.








[ Post a follow-up to this message ]



    Re: Slightly Different Login failed for user 'sa'  
Ayaz Ahmed


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-20-04 03:39 PM

Hello,

set sa password and login into sa user id and pwd which you will define.

Thanks.

Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile      +92 300 2280950
Office      +92 21 455 2414

*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:00 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

Back To The Top
Home | Usercp | Faq | Register