Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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 ?

share|improve this question

migrated from stackoverflow.com Jul 28 '13 at 11:20

This question came from our site for professional and enthusiast programmers.

    

1 Answer 1

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

share|improve this answer
    
Hi Mitch i have done that and on user mapping > database role membership i set it as owner and so. but this just creates another use and i still get the same error? –  user2606847 Jul 28 '13 at 15:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.