About deploying Entity Framework for SQLite

Source: Internet
Author: User

To develop a website, we want to use SQLite for deployment convenience, so we should try a demo first. The local machine runs normally and then try it on the server, "the specified storage zone provider cannot be found in the configuration or is invalid." ----> "Find the. NET Framework data provider that is not requested. May not be installed ". The original is English, probably this meaning, so searched, find this article: http://blog.csdn.net/liufan76/archive/2008/10/29/3173282.aspx

Add the code to Web. config as follows:

 

<System. Data>
<Dbproviderfactories>
<Remove invariant = "system. Data. SQLite"/>
<Add name = "SQLite data provider" invariant = "system. data. SQLite "Description = ". NET framework data provider for SQLite "type =" system. data. SQLite. sqlitefactory, system. data. SQLite, version = 1.0.57.0, culture = neutral, publickeytoken = db937bc2d44ff139 "/>
</Dbproviderfactories>
</System. Data>

As mentioned in the article, the second problem occurs: A null was returned after calling the 'getservice' method means that "the getservice method is called and the returned value is null". I am tired of reading the solution in this article. It is a bit difficult to understand, So Baidu is a problem, fortunately, I found an article in E: using system. data. SQLite. after being released to the local device, the system runs normally.

 

To sum up, you must go to the Web. config specifies the data provider and it is okay to introduce the SQLite-related LINQ assembly. In addition to the framework, it is quite convenient to deploy the server, SQLite and EF can be used for virtual hosts with no control permissions.

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.