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

Last post 02-29-2008 4:44 AM by poddar_himanshu@yahoo.co.in. 8 replies.

Sort Posts:

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

    06-25-2003, 8:51 AM
    • Loading...
    • foo73
    • Joined on 05-28-2003, 2:50 PM
    • Posts 2
    I just installed the CSK and chose the option to use Windows authentication. However, now I am getting this error when trying to access the site:

    Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    Stack Trace:


    [SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.]
    System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
    System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
    System.Data.SqlClient.SqlConnection.Open() +384
    System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
    System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
    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) +38
    ASPNET.StarterKit.Communities.CommunityUtility.GetAllCommunitiesFromDB() +93
    ASPNET.StarterKit.Communities.CommunityUtility.GetAllCommunities() +58
    ASPNET.StarterKit.Communities.CommunityUtility.GetCommunityInfo() +326
    ASPNET.StarterKit.Communities.CommunitiesModule.Application_BeginRequest(Object source, EventArgs e) +221
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87


  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    06-25-2003, 9:07 AM
    • Loading...
    • bentomkins
    • Joined on 06-09-2003, 6:44 AM
    • Posts 36
    try putting this inside your web.config file inside the <system.web> tag...

    <system.web>

    <identity impersonate="true" userName="xxxxx" password="xxxxx" />

    <.system.web>
  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    06-25-2003, 9:36 AM
    • Loading...
    • foo73
    • Joined on 05-28-2003, 2:50 PM
    • Posts 2
    I added this using a local account and it worked beautifully. Thanks for your help.
  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    11-13-2003, 2:44 PM
    • Loading...
    • saxroots
    • Joined on 07-22-2003, 12:57 PM
    • Posts 4
    Thank you so much - I had the same problem and your solution worked perfectly - thanks!
  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    08-16-2007, 9:38 PM
    • Loading...
    • geoDenver
    • Joined on 08-17-2007, 1:34 AM
    • Posts 1

    Just an addendum. If you exclude the usernName="" and password="", it uses the authenticated user's permissions. That way you can customize permissions based on the Windows users or groups and you're not stuck with only one account.

     Thanks so much for your post, it helped solve a very nagging problem.

  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    09-10-2007, 4:56 PM
    • Loading...
    • user2008
    • Joined on 09-10-2007, 6:31 PM
    • Posts 6

    Hi,  One doubt with this!  If the configuration is hardcoded with username and password of one user, how will other users be able to authenticate through those credentials?? 

    Thanks,

  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    12-08-2007, 2:46 AM

    hi all,

    when i run my application on local pc or local host it runs fine but when i put it on server and try running from IP of server "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'" error come,

    i made changes as suggested above in <System.web> now the error changes to "Login failed for user 'SERVERNAME\IUSR_WEB-SERVER'".

    can any one help....i have been using same web.config with same code in other project too...but without error.

    please tell me the possible source of error.

    thanks

    --------------------------------------------------------

    Mark as answered if this or any other post helps in finding solution to ur query, it will help others later....
  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    02-28-2008, 11:58 AM
    • Loading...
    • shwaqar
    • Joined on 08-23-2006, 2:07 PM
    • Posts 13

    Hi

    I have the same issue. I tried using the above code in web.config. Nothing happens. Any help please......?

     

    Regards

    Shaukat

  • Re: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

    02-29-2008, 4:44 AM

    Hi Shaukat,

    Hope u hv checked ur IIS setting and is fine.

    Next see the database u r using has 'sa' dbo Login Name which is created at the time of database creation.

    This will be under databasename>users.

     Regards.

    --------------------------------------------------------

    Mark as answered if this or any other post helps in finding solution to ur query, it will help others later....
Page 1 of 1 (9 items)
Microsoft Communities
Page view counter