Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login Failed for user 1

Status
Not open for further replies.

dpdoug

Programmer
Nov 27, 2002
455
US
I'm trying to connect to a database on my local machine, but I keep getting the error: Login failed for user 'DEV6\IUSR_DEV6'.

This is the connection string I am using:

Code:
"Data Source=(local);initial catalog=favorites;Trusted_Connection=yes;Integrated Security=SSPI"

I have the following entries in my web.config:
Code:
   <authentication mode="Windows" /> 
   <identity impersonate="true" />

In the Security Logins, in the sa account under authentication both Windows Authentication and SQL Server Authentication are greyed out there is no way to select either one.

When I created the database, I selected both windows and SQL Server Authentication, but I still get the error when I try to login.

I can make a successful connection with Access, with UDL, and with the Data Sources (ODBC), but no connection string that I try will work with asp.net -- it seems to be some config problem with vs.net

Can anyone help me out here?
 
Are you saying that if you go into Enterprise Manager and try to add the DEV6\ASPNET account to the list of database users, you can't? If not, then do it. Then change your connection string to Data Source=DEV6 and see if it works. Also, when you installed your SQL Server did you set up a named instance or did you let it default to your machine name (DEV6 - which is the way to go)?
 
I let it default to my machine name.
 
Ok, I did that now it's giving me a different error message:

Code:
SELECT permission denied on object 'Links', database 'favorites', owner 'dbo'.
 
OK, select the DEV6 user in EM, select properties and click the boxes that say public, db_dataReader and db_dataWriter. Click OK and you should be good to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top