Solve
Solution: User ' sa ' login failed. Reason: not associated with a trusted SQL Server connection.
This is the problem with authentication today, so organize my solution for sharing with friends who have the same experience:
Question brief:
User ' sa ' login failed. Reason: not associated with a trusted SQL Server connection.
Note: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.
Exception Details: System.Data.SqlClient.SqlException: User ' sa ' login failed. Reason: not associated with a trusted SQL Server connection.
SOURCE Error:
Row 118:sqlcommand cmd=new SqlCommand (Sql,con);
Line 119:
Line 120:con. Open ();
Line 121:
My resolution steps:
This problem is typically caused by SQL Server not Integrated Windows authentication, so the solution is:
1 Open SQL Server Enterprise Manager.
2 Select "Edit SQL Server Registration Properties" on the server name and select "Use Windows Authentication" in the dialog box.
3 Give it a try, no. Looking at security settings
4 the same Right button, select Properties, and then open the Security tab.
5 in the tab, select Authentication as SQL Server and Windows, and other unchanged