SQL Server Lite version does not support ASP. NET?

Source: Internet
Author: User
Tags sql server express

After I wrote "select between SQL Server express and compact", some friends in the garden asked SQL Server Lite version (sqlce) does not support ASP. NET? At that time, I was not sure. I did not test it myself, but I felt strange and could not support it without reason!

Today, I read Steve Lasker's blog and finally figured it out!

Because sqlce does not support ASP. NET by default, many users make requests to Ms, constantly complain, or even intimidate (if you do not allow it to support, I will use XX product ). Steve Lasker finally got stuck and came out to clarify everything.

In fact, the sqlce market position is very clear, mainly to solve the problem of offline data storage and synchronization of Smart Clients. The selection between SQL Server express and compact is also clarified. Therefore, Microsoft has not optimized the use of sqlce as a Web site database. In the environment of multi-user access and data concurrency on the web site, the performance of sqlce is not ideal, which is incomparable with SQL Server Express. Therefore, we recommend that you use SQL Server express or SQL Server database for the web site. You must know that sqlce is an embedded database engine, while SQL Server Express is a database service. The hosting toolkit SQL Server recently released by the SQL server development team can help you deploy SQL Server express on the Web server.

So can ASP. NET use sqlce for data storage? Yes!

By default, sqlce is blocked when the sqlce database connection is enabled in the ASP. NET workflow. You can use the followingCodeRemove this restriction:
Appdomain. currentdomain. setdata ("sqlservercompacteditionunderwebhosting", true)

Note that sqlce Data Synchronization cannot be used in ASP. NET.

In short, you should not use sqlce in ASP. NET if you want to use it, so pay attention to the consequences!

Refer:
SQL Server compact edition under Asp.net and IIS
Sqlceconnection class (system. Data. sqlserverce)

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.