Results 1 to 5 of 5

Thread: Baffled by ASPNET user thingy

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Unhappy Baffled by ASPNET user thingy

    Whenever I try to connect to the database I get the error message :

    Login failed for user 'DELL\ASPNET'.

    What is this ASPNET?
    How do i set it up?
    Where, What, How HELP????

    Parksie

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    what's the code you're tryin to use to connect to the database?

  3. #3

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    Heres the code i use:

    Dim objConnection As New SqlClient.SqlConnection("server=.;database=dbCustomers;trusted_connection=true")

    Dim objCommand As New SqlClient.SqlCommand("Select * from tblCustomers", objConnection)

    Dim objReader As SqlClient.SqlDataReader

    'Open database connection
    objConnection.Open()

    'Get the result into the datareader object
    objReader = objCommand.ExecuteReader

    'Bind
    grdMembers.DataSource = objReader
    grdMembers.DataBind()

    Parksie

  4. #4
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    You've got "trusted_connection=true", i'm thinkin the prob has to do with the fact that that YOU are not connecting to SQL Server, the ASPNET account is(the one your web page runs under), and if that account is not trusted(and it shouldn't be by default) you're not going to connect. How bout settin up a SQL Server account, removing trusted connection and adding in user id and password? OR grant the ASPNET account access to sql server(i wouldn't do that though!)

  5. #5
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    Ya, so i used trusted_connection = true on my local machine(DeathAngel) and removed the "guest" account from my pubs database, tried to connect and got this:

    Cannot open database requested in login 'pubs'. Login fails. Login failed for user 'DEATHANGEL\ASPNET'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width