I just upgraded my host to MVC 3 but I'm trying to do a "hello world" using SQLCE 4.0 but I just got:
Sorry, an error occurred while
processing your request.
I see my layout and everything but instead of data I see that.
On localhost is working as expected
I have:
<add name="PruebaContext" connectionString="Data Source=|DataDirectory|db.sdf" providerName="System.Data.SqlServerCE.4.0"/>
as connectionString.
I put the sdf as part of the project, I added the System.Data.SqlServerCE.dll to the project with the local copy to true.
I have no more ideas. The connString, the dll is in /bin and is working in localhost.
Any ideas?
Thanks.
EDIT
I have some logs now:
Without the "System.Data.SqlServerCE.dll" on /bin:
Unable to find the requested .Net Framework Data Provider. It may not be installed.
System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
Fine enough. They don't have SqlServerCE4.
With the Dll on local copy, AKA /bin:
Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8482. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
Exception Details: System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8482. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details.
The KB says that I need the dll from x86 and amd64. I read somewhere that if I copy two directories to /bin, like: /bin/x86 and /bin/amd64 . I copied that folders from the private folder of SqlServerCE 4 installation folder. Now I got:
Possible file version mismatch detected between ADO.NET Provider and native binaries of SQL Server Compact which could result in an incorrect functionality. This could be due to the presence of multiple instances of SQL Server Compact of different versions or due to wrong binaries with same name as SQL Server Compact binaries. Please install SQL Server Compact binaries of matching version.
Ok. On the root folder of SQLServerCE4 I have some dlls too, so I deleted that two folders and copied that dll to /bin:
Could not load file or assembly 'file:///C:HostingSpacesjesusrodfoxandxss.netwwwrootmvc3insqlceca40.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
I think that I tried all things. Scottgu said that SqlServerCE 4 should work on any server without installation.
See Question&Answers more detail:
os