CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2000
    Location
    Kansas City, MO
    Posts
    37

    Angry sqlConnection - Login failed for user 'sa'.

    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.

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878
    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
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167
    Post your connection string.

    -Cool Bizs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured