This question already has an answer here:
We receive an error
Login failed for user 'x' sometimes from our application. We are 100 % sure the login is working because we checked it by manual login from SSMS as well as from the application. The error happens sometimes only. How can we find the exact reason for the failure? Why does it fail only sometimes? Below is the whole stack trace:
Exception Type : System.Data.SqlClient.SqlException
Message : Login failed for user 'x'.
Source : .Net SqlClient Data Provider