I have followed the following posts completely:
http://support.appharbor.com/discussions/problems/544-error-with-reference-to-systemdatasqlserverceentity-dll
Using SQL Server开发者_StackOverflow CE 4 on a remote host with MVC 3
and I am still receiving the following error:
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.
What I have done:
Fresh File -> New ASP.NET MVC 3 application. Via NuGet added EFCodeFirst.SqLServerCompact v0.8.8482.1 which added the necessary packages.
Locally everything works great. I build/clean/rebuild and commit the entire solution via Git and push to AppHarbor. All pages not touching SQL CE work as expected. When I try and load the page that is talking to SQL CE I see the attached exception:
Below are my packages installed:
Below is what my Bin directory looks like:
I couldn't get this working either, I spent ages on trying. I ended up just changing over to the proper SQL Server supported by AppHarbor (since using SqlCompact in the App_Data folder is dangerous for various reasons anyway).
SQL server CE can be made to run on AppHarbor, although we don't recommend using it for the reasons Danny Tuppeny mention. This support case contains working code.
I had same problem with Asp.net. Here is how I solved it:
The problem was permission issue. Current Application Pool's identity IWAM_plesk(default) didn't have access to SQL Server Compact 4.0 folders:
C:\Program Files\Microsoft SQL Server Compact Edition\v4.0
C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0
I just granted Read & Execute and List Folder Contents permissions and now it works like a charm.
精彩评论