I had the same problem with Asp.net. Here's how I solved it:
The problem was with the resolution. Current Application Pool Identifier . IWAM_plesk (by default) did not 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 and execute permissions and a list of the contents of the folder, and now it works like a charm.
source share