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.