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:


How can you solve this problem?


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

  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy