How to run the Asp.net + SQL Server website

Source: Internet
Author: User
Tags sql 2008 server website

Download the corresponding code of Asp.net + SQL Server and how to make the local machine run properly.

1. the Code Section is directly opened through the vs development environment, mainly Web. config configuration file, <Add name = "dbconnectionstring" connectionstring = "Server = ASUS-14C4E4992D \ sqlexpress; database = register; Integrated Security = true;"/> such as above, connectionstring = server where the server is connected to the database server you configured locally.

2. Deploy the local database. Generally, the database files are in the app_data folder in the Code. The extension is. MDF and LDF.

3. make sure that SQL Server is installed on the local machine. Copy the two databases to the installation path of the local SQL Server. For example, the installation path is C: \ Program Files \ Microsoft SQL Server \ mssql10. under the server name \ MSSQL \ data.

4 ., I have installed SQL 2008. After opening it, right-click the database and choose "Attach Database". The "Attach Database" dialog box is displayed. Select the database to be appended. The path is C: \ Program Files \ Microsoft SQL Server \ mssql10.yxm \ MSSQL \ data.

5. Click OK.

6. return to the Code to view the web. in the config file, append the corresponding server = the name of the server that you have attached to the database, as shown in <Add name = "dbconnectionstring" connectionstring = "Server =. \ Server Name; database = register; Integrated Security = true; "/>

7. The deployment of Asp.net + SQL Server is similar to the above steps.

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.