none
SQL Compact Edition on Windows Azure

    Question

  • 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

    AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true); 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.

    Sunday, April 24, 2011 3:34 PM

Answers

  • Hi Harish,

    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.

    Thanks,


    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework


    • Proposed as answer by tijmenvdk007 Monday, April 25, 2011 7:39 PM
    • Marked as answer by Wenchao Zeng Monday, May 02, 2011 2:50 AM
    Monday, April 25, 2011 9:27 AM

All replies

  • Hi Harish,

    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.

    Thanks,


    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework


    • Proposed as answer by tijmenvdk007 Monday, April 25, 2011 7:39 PM
    • Marked as answer by Wenchao Zeng Monday, May 02, 2011 2:50 AM
    Monday, April 25, 2011 9:27 AM
  • ScottGu explains in a post that SQL Compact CE is allowed in Azure, not recommended, yet allowed. 

    Quote:

    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. 

    "http://archive.feedblitz.com/257079/~3857194"

    Hope that helps

    • Proposed as answer by P Velachoutakos Wednesday, December 28, 2011 1:31 PM
    Friday, December 23, 2011 5:22 AM