Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install yet another forum on my local machine, and while I'm configuring the database connection I got this message

Failed to connect:

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

I have served Google and I found that I have to add network service Login to my SQL server and then add this user to my database

I don't know if this is true or false but anyway I don't know hot to add the network service to my SQL server

please help as soon as you can

Thanks in Advance

share|improve this question

migrated from Jun 13 '11 at 12:51

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

up vote 4 down vote accepted

This is the Identity of the Appplication Pool in IIS

Local database, same box as IIS:


Local or remote database in Active Directory domain

share|improve this answer
Personally, I'd recommend changing the application pool identity to a dedicated account for the site if using Windows authentication, but yes, this should work. – db2 Jun 13 '11 at 13:12
@db2: agree: this is I do. – gbn Jun 13 '11 at 13:20

Goto SQL Server Management Studio => Security. Right click on Logins => New Login.
In Login name type NT AUTHORITY\NETWORK SERVICE. Click ok.

Now click on your yaf database => Security. Right click on users => New User...
Fill in the username your desired name. in Login name type NT AUTHORITY\NETWORK SERVICE. Choose db_owner in Schemas and Database Role Membership click ok.

You should be able to login to your databse with your desired username and password.

share|improve this answer

Yes, I agree with gbn and Kamyar. You can preview the example/tutorial on here.

share|improve this answer

Your Answer


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.