I understand that I can add SQL server express to an Azure virtual machine but can I add the DB to azure "websites", or do I need to use Azure SQL if I want to use a SQL DB for Azure "websites"?
No,
You can't use/add/install any software when using Azure WebSites. The data storage possibilities for your application running in Azure WebSites are: Azure SQL Database (former SQL Azure), Azure Blob Storage, Azure Table Storage, MySQL database (currently only provided as part of provisioning PHP CMS's in Azure WebSites).
Yes, but you have to create a SQL Compact Edition in your root, not SQL Server Express.
I've written an article about it.
This is my related question post on StackOverflow, and this is the English version I found.
Step by Step like this:
Install two Nuget packages (EntityFrame.SqlServerCompact
& Microsoft SQL Server Compact Edition
)
Put your SQL database file(.sdf/.mdf) in APP_Data folder (Add the connection string like this in order to use it:
<add name ="DefaultConnection" connectionString ="Data Source=|DataDirectory|CompactDB.sdf" providerName ="System.Data.SqlServerCe.4.0" />)
Publish full project include above SQL database file to AzureWebsites.
You'll find it can work well, and is totally free.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With