An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.
Exception Details: System.Data.SqlClient.SqlException: User ' xxx\aspnet ' login failed.
After migrating the site today, we found this problem. After groping, found that the reason is that we log on to the database role of the database is not enough permissions.
Solution:
1. Open the Database Enterprise Manager, and then select the database---security---find just the error of which ' xxx\aspnet '--Right Key "property";
2. Select the user mapping option---to select the database in which we want to access
3. Make sure---then select which database we have just chosen, and select "db_owner" permission in the following "Database role membership"
So far, the problem is solved.