Use of MDF database files in Asp.net

Source: Internet
Author: User

The asp. ne source code downloaded from the internet has an mdf database. Now let's take a look at its usage.
Note that there is a difference between sqlexpress and the official version of mssqlserver connection string. You can check the information online.
1. append this database file to MSSMSE,

View the connection string in the source code directory.
<ConnectionStrings>
<Add name = "SperConnectionString1" connectionString = "Data Source =. \ SQLEXPRESS; User ID = sa; pwd = sa; Initial Catalog = Sper_lvyou "providerName =" System. data. sqlClient "/>
<Add name = "sper_lvyouConnectionString1" connectionString = "Data Source =. \ SQLEXPRESS; User ID = sa; pwd = sa; Initial Catalog = Sper_lvyou "providerName =" System. data. sqlClient "/>
</ConnectionStrings>

The database name is Sper_lvyou.

2. Find the database of the website in the data connection, right-click on it to modify the connection, and select enter user for SQL Server Authentication

Name and password and test connection

If the error "unable to generate an SQL Server user instance, only integrated connections can generate user instances. This connection will be closed"
Select False in User Instance.

Test the connection. If the user name and password are correct, the connection can be successful.

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.