Login failed error: Am totally stuck. Please assist

Last post 02-08-2005 2:50 PM by bdesmond. 3 replies.

Sort Posts:

  • Login failed error: Am totally stuck. Please assist

    02-04-2005, 2:41 PM
    • Member
      355 point Member
    • tryston02
    • Member since 10-10-2004, 2:48 PM
    • Posts 71

    I am fairly new to ASP.NET and am receiving this error and cannot seem to find an answer, someone please help!!!

    Here's my setup: I have two computers. 1 Windows 2000 server domain controller that is also my SQL 2000 database (not the ideal setup but only for learning purposes) and 1 Windows XP client with SP2 installed and Visual Basic.NET standard edtion installed. Also, have windows authentication set for SQL Server 2000.

    Whenever I try to run my code (ADO.NET) I get this error:

    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

    I have heard people talk about an ASPNET user account on the machine, but when I go look into my domain accounts it's not there. However if I browse to the local machine it is there. Should it be there as a domain account or do I have to created it? And what would I have to set up in SQL 2000?

    I would really appreciate any help you could provide for me.

    Thank You,

    Chris
  • Re: Login failed error: Am totally stuck. Please assist

    02-06-2005, 9:26 PM
    • Contributor
      4,745 point Contributor
    • bdesmond
    • Member since 06-15-2002, 2:02 PM
    • Chicago, IL USA
    • Posts 944
    • TrustedFriends-MVPs
    Chris-

    The ASPNET account will be a local, not a domain account.

    If you want to use integrated auth with MSSQL, you'll need to create a domain account for the asp.net application to run under. You can then configure impersonation in your web.config file, and also grant this account access to the db.
    --Brian Desmond
    Windows Server MVP - Directory Services
    http://www.briandesmond.com
  • Re: Login failed error: Am totally stuck. Please assist

    02-08-2005, 1:49 PM
    • Member
      355 point Member
    • tryston02
    • Member since 10-10-2004, 2:48 PM
    • Posts 71
    Ok, thank you. Do I create the domain for asp.net as a user, group or what?
    Thanks again and take care,

    Chris
  • Re: Login failed error: Am totally stuck. Please assist

    02-08-2005, 2:50 PM
    • Contributor
      4,745 point Contributor
    • bdesmond
    • Member since 06-15-2002, 2:02 PM
    • Chicago, IL USA
    • Posts 944
    • TrustedFriends-MVPs
    Chris-

    You'll need a domain user account. If you're using IIS6, you can configure the app pool to run as this user and just put this application in that pool. If you're running IIS5, check out the <impersonate> web.config tag in MSDN. :)
    --Brian Desmond
    Windows Server MVP - Directory Services
    http://www.briandesmond.com
Page 1 of 1 (4 items)