No More Solutions

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Login failed for user 'XXX\ASPNET'


Server Error in '/ExamWebsite' Application.

Login failed for user 'XXX\ASPNET'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'XXX\ASPNET'. Source Error:
Line 60:                 DataTable dt = new DataTable();
Line 61: 
Line 62:                 conn.Open();
Line 63:                 cmd.Connection = conn;
Line 64:                 cmd.CommandText = "spr_GetVisit";
Note: XXX = the name of the user.

This error usually occurs when using integrated security for the database connection.

For SQL Server 2000's users:
1. Go to SQL Server Enterprise Manager.
2. Expand the tab Microsoft SQL Servers -> SQL Server Group -> Server used -> Security.
3. Right Click on Logins, then select New Login.
4. On the Name textbox, type xxx\ASPNET, then click "..." on the right. (where xxx is the name of the user). Choose ASPNET on the new dialog window displayed, then click Add -> OK.
5. On Server Roles tab, check System Administrators.
6. On Database Access tab, check the databases to be used, and check the roles as public and db_owner.
7. Click OK.
Bookmark and Share


  1. Anonymous said...

    Thks... my issue solved with this advice

Post a Comment