HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Can not find 'NT AUTHORITY\NETWORK SERVICE'. on Sql Server 2012

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
can2012sqlauthorityservicefindservernotnetwork

Problem

Hi How do i fix this Error?
when i run my MVC app i get this error
though my web.config is find. the error is on my DB call Sample:

Cannot open database "Sample" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

Also cannot find ‘NT AUTHORITY\NETWORK SERVICE’. on my sql server management studio 2012 object explorer under Security > Logins to right click and set the Properties.

How can i add it, is this a win vista issue ?

Solution

You can't find the NT AUTHORITY\NETWORK SERVICE because it hasn't been added. You need to explicitly add it.

Goto Security-> Logins (in SSMS) and add that user. Then go to your database and add as a login with relevant permissions.

Better still, script it:

CREATE LOGIN

CREATE USER

Context

StackExchange Database Administrators Q#47172, answer score: 2

Revisions (0)

No revisions yet.