Click to See Complete Forum and Search --> : sqlConnection - Login failed for user 'sa'.


bslezak
April 13th, 2003, 07:22 PM
I have an interesting problem beyond the normal mixed mode security for SQL 2000. I'm a newbie to ASP.NET, and trying to get the Web App walkthrough example to work. My problem is that Windows Authentication works fine, but using a SQL user/pass does not. (Again, I _am_running SQL Server in mixed mode.)

I receive in the stack trace:

[SqlException: Login failed for user 'sa'.]
System.Data.SqlClient.SqlConnection.Open()

No problems at all when sqlConnection uses NT integrated security, but the above error is returned when I try sql user auth. I've added appropriate accounts to SQL server, and assigned them appropriate read/write permissions to the DB I'm working with. I've also tried creating a SQL account other than sa.

If this is something simple, it doesn't seem to be one of the common newb problems. ;)

Any suggestions appreciated.

Iouri
April 16th, 2003, 01:02 PM
It looks like you are running Windows authentication. In this case the user name is ASPNET. Add this user if you don't have to the user account and give him permission on your SQL server

coolbiz
April 18th, 2003, 02:50 PM
Post your connection string.

-Cool Bizs