Wednesday 21 November 2012

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

Sometimes when we are trying to connect to the SQL Server 2008 R2 via ASP, the website throws an error message like Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

So, the solution to this error is very simple:

1-Open the SQL Server 2008 R2.
2-Expand the Security panel and then expand the Logins panel.










3-After that, right click on the NT AUTHORITY\NETWORK SERVICE user and then click on the properties. 

4-Click on the User Mapping option on the left panel and then map the NT AUTHORITY\NETWORK SERVICE user on the database by checking the check box on the map column of the desired database.









5-Write the default schema as dbo and on the database role membership for: database box check the db_owner option and after that click OK

















6-After that just refresh the server and refresh the website's link on the browser. 

No comments:

Post a Comment