SQL Server Login error

Hello,

I have a PC running Vista Home Premium.

I have an ASP application that is trying to access a local SQL Server 2000 database.

The database is registered to use Windows authentication (don't know if that authentication exists in Vista Home Premium).

In the file DSN, used by the ASP application, it is registered in ODBC "With Windows NT authentication using the network login ID".

I get an error when my ASP application tries to access the database:

"Login failed for user "NT AUTHORITY/IUSR"

Any advice?

Thanks in advance,

Steve
skbohlerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tree33Connect With a Mentor Commented:
Did you also add a role to that login for the database? Depending on the access that user needs you can try with datareader and/or datawriter.

Only adding the login the the SQL Server is not enough, you also have to assign this login to a database.
0
 
tree33Commented:
You probably only have to grant access to the database for IUSR_%MACHINENAME%.
When this doesn't help, can you please give us more details on the connection string you're using.
0
 
skbohlerAuthor Commented:
How do I grant access to the SQL Server database to that account?

The connection string is just: "FILEDSN="c:\users\{dir}\application.dsn"
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
tree33Commented:
Use SQL Enterprise Manager to add the user IUSR_%MACHINENAME% to the SQL Server in the security node.
Then go to the database's Logins node and add the login to the DB and set the needed permissions for that login.
0
 
skbohlerAuthor Commented:
OK, I tried to add the login.

For Windows Authentication, In the Domain drop-down, I chose the computer name. That auto-filled the login name, but when I tried to OK it, it tells me that:

{MachineName}\IUSR_{MachineName} not found. Check the name again.

What am I doing wrong?

Thanks!

Steve
0
 
skbohlerAuthor Commented:
I added the login:

NT AUTHORITY\IUSR and it took that.

Now, the error I get:

"Cannot open database requested in login '{database}'. Login fails.

??
0
 
skbohlerAuthor Commented:
OK, I see I didn't add it to the database. Fixed. Thanks!!!!
0
All Courses

From novice to tech pro — start learning today.