Link to home
Start Free TrialLog in
Avatar of Steve Bohler
Steve BohlerFlag for United States of America

asked on

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
Avatar of tree33
tree33

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.
Avatar of Steve Bohler

ASKER

How do I grant access to the SQL Server database to that account?

The connection string is just: "FILEDSN="c:\users\{dir}\application.dsn"
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.
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
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.

??
ASKER CERTIFIED SOLUTION
Avatar of tree33
tree33

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK, I see I didn't add it to the database. Fixed. Thanks!!!!