开发者

SQL CE Deploy - AppHarbor - Unable to load the native components of SQL Server Compact

开发者 https://www.devze.com 2023-03-07 04:25 出处:网络
I have followed the following posts completely: http://support.appharbor.com/discussions/problems/544-error-with-reference-to-systemdatasqlserverceentity-dll

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:

SQL CE Deploy - AppHarbor - Unable to load the native components of SQL Server Compact

Below are my packages installed:

SQL CE Deploy - AppHarbor - Unable to load the native components of SQL Server Compact

Below is what my Bin directory looks like:

SQL CE Deploy - AppHarbor - Unable to load the native components of SQL Server Compact


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号