Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I searched without finding an answer exactly matching my case. But I got an idea on a blog mentioning a bad formed tag in the machine.config file. When looking in it I found this very crucial section:</p> <pre><code> &lt;system.data&gt; &lt;DbProviderFactories&gt; &lt;add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt; &lt;add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt; &lt;add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt; &lt;add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&gt; &lt;add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt; &lt;add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/&gt; &lt;/DbProviderFactories&gt; &lt;/system.data&gt; </code></pre> <p>In my machine.config file the section DbProviderFactories was empty. I tried to add it but was not able, because it was locked by some application. On the other hand my customers may run into the same problem and it is difficult for me to have them edit machine.config. So I did it the easy way: added the section to my application config file! Voila! Everything is back to normal. My application runs beautifully again.</p> <p>But why did it work in my previous Windows installation? Why is this section not always added to machine.config? Why is DbProviderFactories never mentioned as a prerequisite in demo samples on SqlCe 4.0 in combination with EntityFramework 5.0? Is this maybe just a problem in .Net Framework 4.5?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload