Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Consider an ASP.NET application to an IIS instance (Windows XP Service Pack 3). The application is calling into SQL Server 2000.

When navigating to the website, an error is thrown:

LOGIN FAILED FOR USER (username)

How can you solve this problem?

share|improve this question

2 Answers 2

Your problem isn't anything to do with IIS, but rather it sounds like a SQL Server login permissions issue.

Check your configurations for:

  • IIS6 pool identity
  • application's web.config ConnectionStrings node.
  • hardcoded values in your ASP.NET application at the time it's making an ADO.NET connection to your SQL Server instance.
  • ensure that login is enabled on your SQL instance. Ensure that you can login yourself via Query Analyzer.

alt text

share|improve this answer
    
No app pool identities on IIS 5.1 (xp) –  Wyatt Barnett Mar 5 '11 at 14:21

You need to find out what type of authentication your ASP.NET application is using. It can be SQL Server authentication or Windows Authentication.

If it's SQL Server Authentication:
The login/password combination will be stored in the web.config file in your ASP.NET application directory. You can create a user/password in SQL Server and update the connection string to use these.

If it's Windows Authentication: The username that will be used can be either the current user (if impersonation is enabled), or the user that runs the IIS process (depending on your OS, IIS version and configuration, it can be various things). You will need to grant access for that user (or a security group that the user belongs to) to your database.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.