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 biv343 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 'IUSR_DEVSQL01'.

Status
Not open for further replies.

byrne1

Programmer
Aug 7, 2001
415
US
I'm new to IIS and ASP. I have an ASP page that prompts the user for a login ID and password. This information is supposed to be validated against an SQL database but I keep getting the following error:

Microsoft OLE DB Provider for SQL Server error '80040e4d'
Login failed for user 'IUSR_DEVSQL01'.

Can anyone help me w/ this? Thanking you in advance for your help!
 
Sounds like you are using NT authentication to try and access the SQL server. IUSR_*PCName* is the default account that IIS uses to obtain anonymous NT autentication, try adding a SQL username and password to your database connection string.

G -GTM Solutions, Home of USITE-
-=
 
I thought that this was supposed to happen - ie, access the ASP via the anonymous login ID. In the real world do people normally set up their ASPs to use real IDs and passwords? That may sound silly but I can't think of any other way to ask it.
 
Hello byrne1,

My ASP application creates a connection to SQL Server using a userID and password in the connection string. The userID is setup as a login in SQL Server, not necessarily in NT. IUSR_MY_COMPUTER must have permission to run the ASP scripts in my application. This is granted in NT. IUSR_MY_COMPUTER is not setup as a login to SQL Server.

Now, I don't know exactly how all that security works, but this is how a normal person does it in the real world (at least I believe I am normal and in the real world.):)

Richard

 
There are two ways you can go about giving your anonymous IIS user access to your SQL server.

1.
Tell SQL server to use NT authentication and grant access to the correct database to IUSR_DEVSQL01.

2.
Create a new SQL logon (in SQL enterprise manager) and grant read (and write if needed) permission to the correct database. OPen up you control panel and change you're system DSN (presuming thats what you are using) to uses SQL authentication and this newly created username/password. As an extra check, add the words:
;uid=myusername;pwd=mypassword;
to your connection string.

Hope this helps you.

G
-GTM Solutions, Home of USITE-
-=
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top