Solution: User "sa" Logon failed

Source: Internet
Author: User
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



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.