How to run the asp.net + SQL server website

Source: Internet
Author: User
Tags sql 2008 server website

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.