View Single Post
  #1 (permalink)  
Old May 14th, 2009, 12:36 PM
litlmike litlmike is offline
Registered User
 
Join Date: May 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

I receive the following error when trying to do the example from page 28 (chapter 2, 'adding a record'). I have been trying to find a solution for the last several hours, if you can help in any way that would be great. Thanks

Code:
 
Server Error in '/PaidTimeOffUI' Application. 
 
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. 
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
 
Source Error: 
 
Line 43:
Line 44:         // Save the changes to the db
Line 45:         db.SubmitChanges();
Line 46:     }
Line 47:         
Source File: e:\Mirrored\MUST Save\Web Creation\Projects\PaidTimeOffSolution\PaidTimeOffUI\Default.aspx.cs    Line: 45 
 
Stack Trace: 
 
[SqlException (0x80131904): Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +248   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2811   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +53   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +327   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +2445370   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +2445224   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +354   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +703   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +54   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +2414776   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +92   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1657   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +84   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +1645767   System.Data.SqlClient.SqlConnection.Open() +258   System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) +659   _Default.btnInsert_Click(Object sender, EventArgs e) in e:\Mirrored\MUST Save\Web Creation\Projects\PaidTimeOffSolution\PaidTimeOffUI\Default.aspx.cs:45   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
 
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082