Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I been strugling with this for 2 days now without comming any closer to solution. I have read 20-30 threads alteast and stil can not resolve this.

Please help me out.

I have disable anonymous authentication, enable asp.net impersonation.

I have added <identity impersonate = "true" />

I have added the a user to the security logins that is connected to the database I try to connect to

This is the connectionstring I use:

Data Source=IPTOSERVER;Initial Catalog=Phaeton;User Id=User;Password=Password; 

errormessage:

Cannot open database "Phaeton.mdf" requested by the login. The login failed.

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

like image 861
Dejan.S Avatar asked Feb 12 '10 12:02

Dejan.S


People also ask

What is NT Authority Network service?

NT AUTHORITY\NetworkService ( S-1-5-20 ; also displayed as simply "NETWORK SERVICE") "is a predefined local account used by the service control manager.. has minimum privileges on the local computer and acts as the computer on the network."

How do I reset my NT Authority network password?

You need to open the Services administrative tool snap-in and open the properties on Microsoft Exchange Transport. Go to the Log On tab, click on This Account and enter NT AUTHORITY\NetworkService, then delete any bullets that might appears in both password fields. Stop and restart the service and you should be ok.

How do I log into SQL Server with NT Authority?

Open SQL Server Management Studio. Connect the SQL instance which is installed on the SQL Server and log on to the SQL Server. Go to Security > Logins. Right-click on NT AUTHORITY\SYSTEM and select Properties.


1 Answers

I was experiencing a similar error message that I noticed in the Windows Event Viewer that read:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Reason: Failed to open the explicitly specified database. [CLIENT: local machine]

The solution that resolved my problem was:

  1. Login to SqlExpress via SQL Server Management Studio
  2. Go to the "Security" directory of the database
  3. Right-click the Users directory
  4. Select "New User..."
  5. Add 'NT AUTHORITY\NETWORK SERVICE' as a new user
  6. In the Data Role Membership area, select db_owner
  7. Click OK

Here's a screenshot of the above: Screenshot of adding new user Network Service as db_owner to SqlExpress

like image 115
Jed Avatar answered Sep 19 '22 03:09

Jed