Solved

[SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]

Posted on 2006-10-31
3
510 Views
Last Modified: 2012-08-13

I am trying to use an asp.net application.

I configured the connection string in the web config using the username/password of the windows user account that created the database. I am getting the following error:

[SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
   System.Data.SqlClient.ConnectionPool.CreateConnection() +402
   System.Data.SqlClient.ConnectionPool.UserCreateRequest() +151
   System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +386
   System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   Glide.org.Calendar.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Glide.org\Calendar.aspx.vb:60
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750

 
0
Comment
Question by:SWB-Consulting
3 Comments
 

Author Comment

by:SWB-Consulting
ID: 17847326
i just activated sql server authentication and i am using a user that i created for this database  for.

now i get this:


[SqlException: General network error.  Check your network documentation.]
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
   System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
   System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +301
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
   Glide.org.Calendar.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Glide.org\Calendar.aspx.vb:67
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +750

 
0
 
LVL 8

Accepted Solution

by:
sabeesh earned 500 total points
ID: 17856896
Try to create ASPNET user in your database.
0
 
LVL 4

Expert Comment

by:meenasree
ID: 17857696
See whether the NetworkProtocols are enabled
The database you are connecting should also be windows authenticated otherwise you will not be able to connect
if this is the case then you should use sql server authentication mode in your application
or
the database should be configured for windows authentication
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question