(Website -- ASP. Net configuration --> unable to connect to the SQL Server database --> select a data storage zone &#

Source: Internet
Author: User

1. Suppose we use Visual Studio 2005 at http ://? (Such as http: // localhost/newtest) to create a website project.

2. If SQL Server 2005 Express is not installed on our computer, only SQL Server 2000 is installed.

3. if we use 【Website ---- ASP. NET Configuration], Then the web page of the website management tool will pop up, which contains four themes (Home Page, security, ApplicationProgram).

Click 【Security] Topic 【Unable to connect to SQL Server databaseIn the lower-right corner, there is 【Select a data storage area] Button, which means we recommend that you select a data storage area.

Click [select data storage area] to continue setting. The new page will prompt" The application is currently configured to use the provider:Aspnetsqlprovider ", There are two link options below. The first is" select the same provider for all site management data ", and the second is" select different providers for each function (advanced) click the second link to continue setting.
----------------------------------------------------------------
The above is taken from the thinking Structure
----------------------------------------------------------------
Solution Article It is very detailed, but that can only solve the problem of one virtual directory, if you want to solve all the problems that will be run in sql2005 in the future. i'm afraid net2.0 is too cumbersome, so I looked for it. The main solution to the problem is to modify it. Localsqlserver To completely solve the problem. I know almost everything about net1.1. Machine. config This file can be stored in the main directory (usually drive c) c: \ windows \ Microsoft. net \ framework \ v2.0.50727 \ config find this file and open it in Notepad quickly. Because I have installed sqlexpress2005 before, the value of localsqlserver is "Data Source =. \ sqlexpress; Integrated Security = sspi; attachdbfilename = | datadirectory | aspnetdb. MDF; user instance = true "providername =" system. data. sqlclient ", using aspnetdb. MDF database, now you only need to change the content of this connection string to the sql2005 connection string to completely solve the problem. The value of localsqlsever is changed :" Server = yourservername; database = aspnetdb; user id = sa; Password = your password; trusted_connection = false "
There is an aspnetdb database, and I don't know if it comes with it during installation. I will have it after installing sql2005. If not, you can send me an email. Okay, now it's done.

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.