|
-
Oct 31st, 2002, 10:04 AM
#1
Thread Starter
Fanatic Member
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????
-
Oct 31st, 2002, 10:05 AM
#2
Hyperactive Member
what's the code you're tryin to use to connect to the database?
-
Oct 31st, 2002, 10:53 AM
#3
Thread Starter
Fanatic Member
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()
-
Oct 31st, 2002, 11:16 AM
#4
Hyperactive Member
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!)
-
Oct 31st, 2002, 11:22 AM
#5
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|