Easily resolve problems with ASP.net user ASPNET logon failure

Source: Internet
Author: User
Tags stack trace

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.