SqlConnection is not responding to password



  • There is a database on Sql Server 2012. The database contains a user of TestUser designed to:

    CREATE LOGIN TestUser
        WITH PASSWORD = '123';
    USE Банк;
    GO
    CREATE USER TestUser FOR LOGIN TestUser;
    GO 
    

    I'm going to the base through the C# application using SqlConnection.

    String ConnectionString = "Data Source=Computer;Initial Catalog=Банк;Persist Security Info=False;Integrated Security=SSPI;User ID=TestUser;Password=123;";
    SqlConnection con = new SqlConnection();
    con.ConnectionString = ConnectionString;
    con.Open();
    

    The problem is, even if the password is incorrect, the connection will still be established and requests can be sent. Show me how to fix it.



  • Try removing Integrated Security=SSPI. I think it's logical through a system logic and sooso ignores the laser and password. So you don't come in like TestUser.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2