SQL Server connection error: Login Failed for user 'nt authoritynetwork Service'

Source: Internet
Author: User

This error occurs when you connect to SQL Server in Windows Server 2003 using a trusted connection (that is, when the value of integrated security is set to true,
In Windows XP, the ASP. NET running account is ASPnet, while in Windows Server 2003, the running account is changed to network service.

Solution:
Step 1: Add 'nt Authority \ Network Service' to the Administrator Group
My computer --> right-click --> Manage --> local users and groups
Select "group" --> double-click "Administrators" --> click "add" --> click "advanced" --> click "find now" --> select a network service user from the list below --> click "OK" --> join twice.

Step 2 Add a netword service user to the Enterprise Manager
Open SQL Server Enterprise Manager --> select database instance --> open "security" node --> select "login" --> right-click the list on the right --> select "New login "--> on the "General" tab, click the button next to "name"... "--> select" Administrators "group --> click the" members "button below --> select" Network Service "--> click" add "--> click" OK ", return to the "New login" dialog box --> ensure that the authentication type is "Windows Authentication" and "Allow access" --> click "OK" --> close "Enterprise Manager"

Step 3
Run Asp.net againProgram, Select windows to verify the database connection string.

In other cases, such errors may also occur. Generally, you can grant the user with the corresponding permissions for Logon errors in SQL Server.

Related Article

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.