Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2006, 07:34 AM
Authorized User
 
Join Date: Apr 2006
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default login failed for user domain\user

I've developed an ASP .Net 2 application. Locally, everything was fine. However, when I deployed it on a remote server. I got this error:

Login failed for user 'domain\userx'.

My connection string is:
connectionString="Data Source=ServerName;Initial Catalog=Aspect;User Id =domain\userx;Password = abc"

I'm quite sure that connection string is fine. I need to mention that whenever I try to connect to the remote server from my client by the Sql authentication, I get the message that login failed for this user. But when I try to connect by windows authentication, it works and there is no error.
I asked the administrator, and he told me that Sql Server authentication is in mixed mode.
So, I really can't figure out what is the problem.


 
Old May 24th, 2006, 10:07 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You need a SQL login, not a windows login for this to work.

--

Joe (Microsoft MVP - XML)
 
Old May 30th, 2006, 12:28 PM
Authorized User
 
Join Date: Oct 2005
Location: , , .
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To connect to SQL Server using Windows Authentication, your connection string will look like this:

"Data Source=ServerName;Initial Catalog=Aspect;Integrated Security=SSPI;"


SQL Server Helper
http://www.sql-server-helper.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Login failed for user. Protoman Classic ASP Databases 3 January 13th, 2008 01:23 PM
Funky - Login Failed for user 'Domain\UserId' erro jnks2005 ASP.NET 2.0 Basics 5 February 26th, 2007 01:38 PM
Getting 'Login failed for user ' Squeakrz44 VB.NET 2002/2003 Basics 0 November 18th, 2006 06:09 PM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.