Posted  31 Jan 2009 - 14:34:57

Category: SQL

SqlException: Login failed for user 'ASPNET'.

When you try to access your database from a website you're getting the following error message:

SqlException: Login failed for user 'ASPNET'.

You have to add the ASPNET user to the database security:

  1. Open SQL Server Management Studio.
  2. Select your database.
  3. Right click it and choose "Properties".
  4. Click Permissions.
  5. Add the ASPNET user by searching for it.
  6. Close this dialog.
  7. Select the Security folder and then Logins.
  8. Right click and choose "New Login".
  9. Search for the ASPNET user and add it.
  10. Under "Server Roles", set the permissions you want.
  11. Under "User Mapping", check the appropriate databases for the user.


© SolutionCottage 2008-2011 9/26/2017 10:20:01 AM