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