Solved

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

Posted on 2006-10-31
3
513 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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 …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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