Make sure that you have the Mixed-Mode authentication enabled and here is how to enable it. You can also get this error : 'Login failed for user, if your SQL Server that has not been configured to use Mixed mode authentication, it doesn't actually tell you that this is not enabled!. If you specify both Integrated Security=true as well as a user name and password, the user name and password will be ignored and Windows authentication will be used. By adding those parameters in, SQL Server thinks you want to use SQL authentication instead. Take those two parameters out completely. If you want to use Windows Authentication for SQL Server, don't specify User ID and Password in your connection string. When true, the current Windows account credentials are used for authentication. When set to Integrated Security=False, User ID and Password are specified in the connection. In most cases, just set "Integrated Security=False" and it will work. So, first you have to make sure that the user exist on SQL Server, that the user is enabled, and has access (mapped) to the correct database. You need to connect to the Database Server in your deployed environment, set up the username and password you want to use, and give the account appropriate permissions into the database. When you deploy an SQL database, only the database info moves over. In Sql Server, user accounts and credentials are set at the server level, not at the database level. To increase security, the error message that is returned to the client deliberately hides the nature of the authentication error. When a connection attempt is rejected because of an authentication failure that involves invalid credentials and this message is returned to the client. Login failed for User is a general sql error message and may have several causes.
0 Comments
Leave a Reply. |