I am using SQL CE 4 with Visual Studio 2010 SP1 to create a simple Databinding page. Once I upload it to Windows Azure, I get the "
Access to the database file is not allowed. (System.Data.SqlServerCe.SqlCeException)" exception. I tried putting
in the Global.asax. I also tried giving "Full Control" to Network Service locally. Don't know how to give the permissions on the Azure side though. I used the bin deployable feature of VS 2010 SP1, so have verified that the assemblies do
reside in the application folders. Any pointers would be appreciated.
You want to use SQL Compact Edition on Windows Azure.
As far as I know, Windows Azure does not support SQL Compact Edition. SQL Compact Edition stores data in file system which will not be synchronized in multiple instances (a web role may be deployed to more than one instance. An instance is
similar to a virtual machine). And files stored in file system will lost when the instance is restarted or reimaged.
I would suggest you use SQL Azure instead. Please check
SQL Azure Overview. Microsoft SQL Azure Database is a cloud-based relational database service that is built on SQL Server technologies and runs in Microsoft data centers on hardware that is owned, hosted, and maintained by Microsoft.
ScottGu explains in a post that SQL Compact CE is allowed in Azure, not recommended, yet allowed.
You will be able to easily deploy SQL CE based databases to a remote hosting account and use it to run light-usage sites and applications. As your site traffic
grows you can then optionally upgrade the database to use SQL Server Express (which is free), SQL Server or SQL Azure – without having to change your code.