How do I use SQL CE 4.0 database with hosting account.

Programming, error messages and sample code > ASP.NET

SQL CE request ASP.NET Full Trust. By default your account should be on FULL Trust.  If you're on medium trust server, you'll need to migrate to a Full Trust server first.

We support the latest version of SQL CE,to use SQL CE please follow the steps below:

1. Download SQL CE at

2. Install it!

3. Go to C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private,Copy the following files into your BIN folder:

4. Go to C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private\x86,copy the following files into your BIN folder:

5.Go to C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private\x86\Microsoft.VC90.CRT,copy the following files into your BIN folder:

6) In your Visual Studio, The reference System.Data.SqlServerCe needs to change 'Copy Local' from false to TRUE.

7) Recompile and publish

That's all!  SQL CE should now work and beable to run on your hosting account.


Note: SQL Server Compact Edition cannot work well with Windows Server 2016, getting error


[SqlCeException (0x80004005): Unspecified error [ sqlcese40.dll ]]
   System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent) +2193
   System.Data.SqlServerCe.SqlCeConnection.Open() +47