Solved

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

Posted on 2006-10-31
3
505 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now