Help and Support

PRB: Troubleshooting Error 80004005 "Login Failed" in ASP

Article ID:306586
Last Review:August 11, 2006
Revision:4.0
This article was previously published under Q306586

SYMPTOMS

When use ActiveX Data Objects (ADO) through Active Server Pages (ASP) to connect to Microsoft SQL Server, you may receive the following error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed- User: Reason: Not defined as a valid user of a trusted SQL Server connection.

Back to the top

CAUSE

There are two reasons why this error may occur:
Integrated security is turned on in the SQL Enterprise Manager, and the Microsoft Windows NT account that is being used has not been mapped to a SQL account.
The User ID in the connection string is invalid or blank.

Back to the top

RESOLUTION

To resolve this problem, ensure that the following conditions are met:
The Windows NT account is mapped to a SQL account.
The User ID in the connection string is valid and is not blank.
Set standard security in SQL Server Enterprise Manager. To implement SQL Server standard security, follow these steps:
a. From SQL Enterprise Manager, right-click the SQL Server name that appears in the Server Manager window, and then click Properties. (For SQL Server version 6.5 click Configure).
b. Click Security Options, and then click Standard and Windows. (For SQL Server version 6.5 click Standard).
The Password Synchronization option is turned off for that project if you are running under Microsoft Internet Information Server (IIS) 4.0.

Back to the top

STATUS

This behavior is by design.

Back to the top

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
176377 (http://support.microsoft.com/kb/176377/EN-US/) INFO: Accessing SQL Server with Integrated Security from ASP
176379 (http://support.microsoft.com/kb/176379/EN-US/) HOWTO: IIS and SQL Server on Separate Machines with Trusted Connection
176380 (http://support.microsoft.com/kb/176380/EN-US/) HOWTO: Use ASP with a SQL Trusted Connection with Guest Account
307002 (http://support.microsoft.com/kb/307002/EN-US/) PRB: ASP/ODBC/SQL Server Error 0x80040E4D "Login Failed for User '(Null)'"

Back to the top


APPLIES TO
Microsoft Active Server Pages 4.0
Microsoft Data Access Components 1.5
Microsoft Data Access Components 2.0
Microsoft Data Access Components 2.1
Microsoft Data Access Components 2.1 Service Pack 1
Microsoft Data Access Components 2.1 Service Pack 2
Microsoft Data Access Components 2.5
Microsoft Data Access Components 2.5 Service Pack 1
Microsoft Data Access Components 2.5 Service Pack 2
Microsoft Data Access Components 2.6

Back to the top

Keywords: 
kbprb KB306586

Back to the top

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.