User 'nt Authority \ Network service' Login Failed

Source: Internet
Author: User
User 'nt authority \ network Service'
Logon Failed.

Note: Execute the current web
An unprocessed exception occurred during the request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details: system. data. sqlclient. sqlexception: User 'nt
Authority \ network service 'Logon Failed.
Solution:

This error occurs when you connect to SQL server using a trusted connection.
In XP, the ASP. NET running account is ASPNET, while in Windows server
In 2003, the running account is changed to Network Service and the user is directly added to the SQL
Server login account, so many examples do not need to change the connection string!

(Possible cause)

Test environment: win2003, sqlserver2000 + sp4

1> convert SQL server to SQL server
And windows Authentication Mode 2> (the following method is for reference only) Step 1: Set 'nt AUTHORITY \ NETWORK Service'
Add to Administrator Group
My computer --> right-click --> Manage --> local users and groups
Select "group" --> double-click Administrators --> click "add" --> click "advanced" --> click "find now" --> select Network in the list below
Service user --> click "OK" twice --> join.

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 in the list on the right --
> Select "New Logon" --> click "..." next to "name" on the "General" tab --> select "Administrators" group --
> Click the following "member" button --> select "Network"
Service --> click "add" --> click "OK" to return to the "New Logon" dialog box --> ensure that the authentication type is "windows Authentication"
And "Allow access" --> click "OK" --> disable "Enterprise Manager"

Step 3
Run the asp.net program again and select windows for the database connection string. 3> Add an account or IIS_WPG workgroup to sqlserver

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.