C #. NET Entity SQLite deployment problems

Source: Internet
Author: User

I found a lot, but this is the correct method ..

To develop a website, we want to use SQLite for ease of deployment, so we should try a demo first, the local machine runs normally, and then put it on the server for trial. The problem arises: "The specified storage zone providesProgramCannot be found in the configuration, or it is invalid ." ----> "Find the. NET Framework data provider that is not requested. May not be installed ". The original Article is in English, which probably means this. So I searched and found this article.Article: Http://blog.csdn.net/liufan76/archive/2008/10/29/3173282.aspx

Add this sectionCodeTo Web. config:

 

< 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"   />
</ 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, a look to find an article e text: http://sqlite.phxsoftware.com/forums/p/1349/5793.aspx, although e text can not, but fortunately there is no long article, very simple, plus reference "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.