Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: Troubleshooting Error 80004005 "Login Failed" in ASP


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:
    1. 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).
    2. 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 more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

176380 HOWTO: Use ASP with a SQL Trusted Connection with Guest Account

307002 PRB: ASP/ODBC/SQL Server Error 0x80040E4D "Login Failed for User '(Null)'"

↑ Back to the top


Keywords: kbdsupport, kbprb, kbbillprodsweep, kb

↑ Back to the top

Article Info
Article ID : 306586
Revision : 4
Created on : 6/10/2019
Published on : 6/10/2019
Exists online : False
Views : 301