The "security" tab in ASP. NET configuration prompts "unable to connect to SQL Server database"

Source: Internet
Author: User
ASP. the "security" tab in the net configuration prompts "cannot connect to the SQL Server database" [Content Abstract]. This is usually because we have installed a new database and uninstalled the default sqlexpress installed in VS 2005, because the system will find sqlexpress, of course there will be problems if it cannot be found.

 

This is usually because we have installed a new database and uninstalled the sqlexpress installed by default in VS 2005. Because the system will find sqlexpress, it will be problematic if it cannot be found. Solution:

The instance name I used for self-installation is sqlserver2 and the machine name is a4d5df939a4f4c2.

1. Find aspnet_regsql.exe in the c: \ windows \ Microsoft. NET \ framework \ v2.0.50727directory and regenerate the aspnetdb database.

2. In VS 2005's "tool"-"option"-"database tool"-"Data Connection", change the Instance name to our Instance name.

3. In VS 2005, choose "Tools"> "connect to Database", enter the server name, and select "aspnetdb" for the database.

4. Click "Advanced..." and copy the datasource content.

5. Open IIS, click the properties of the site, click the ASP. NET tab, and change the value of localsqlserver to the string we just copied.

6. On the "authentication" tab, select "enable role management"

7. Success

 

When you encounter the "Stored Procedure 'dbo. aspnet_checkschemaversion'" error, pay attention to the following points:

  1. Whether or not aspnet_regsql has been run on the database of the website. This is a common problem. Many posts on the Internet say that starting the Wizard is just the next step. This is not comprehensive. Select the target and authentication method based on the database used by the website.
  2. Check the Web config of the website. If the connectionstrings section is not found, check the machine of the local machine. config (if there are two 64-bit systems) to check whether the target SQL server connected to the string matches the actual database. The default connection string is express. If you are using the development or Enterprise Edition, pay special attention to it.
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.