-
-
Notifications
You must be signed in to change notification settings - Fork 353
How to Publish to Azure
nairdo edited this page May 20, 2013
·
6 revisions
Here are the steps I took to get Rock running on Azure. This is not to say there is not another path, but only that this was the path I took after several other attempts.
- Install a Windows Azure SDK
- Created website in Azure (website mode "free")
- Created SQL db in Azure
- Added "RockContext" to Azure website connection string.
- Allowed my IP to access Azure SQL via "firewall"
- Changed web.config connection string back to standard (not use
configSource=
)- added Azure SQL connection string into web.config including "MultipleActiveResultSets=True;".
- verify
providerName="System.Data.SqlClient"
is still in connection string<add
tag. - Added
<customErrors mode="Off"></customErrors>
- Changed key="AutoMigrateDatabase" to value="True"
- Added "MultipleActiveResultSets=True;" to Azure dashboard connection string as per StackOverflow.
- Ran update-database (locally with laptop configured to point to Azure SQL db via Rock connection string.)
- Download "the publish profile" from Azure
- Right click RockWeb, and choose "Publish Web Site"
- Import profile (one-time)
- Did not check "Execute Code First Migrations" option in setting (could not get it to work)
- Restart website in Azure
- Install a Windows Azure SDK
- Azure -> Add new website "CUSTOM CREATE":
- Page 1 - Create Web Site
- URL: rockchms
- DATABASE: "Create a new SQL database"
- DB CONNECTION STRING NAME: "AzureConnection"
- Next.
- Page 2 - Specify database settings
- NAME: rockchmA8V3QtxcL (was default)
- SERVER: New SQL database server
- SERVER LOGIN NAME: RockUser
- SERVER LOGIN PASSWORD: ***************
- Complete.
- Page 1 - Create Web Site
- Azure, select website (to see dashboard)
- click "Download the publish profile"
- click CONFIGURE tab, add ";MultipleActiveResultSets=true" to connection string.
- VS, edit web.config
- add to
<connectionStrings>
section<add name="AzureConnection"
... with connection string from previous step. - add
<customErrors mode="Off"></customErrors>
- change
key="AutoMigrateDatabase"
value to "True"
- add to
- VS, Right click RockWeb, and choose "Publish Web Site"
- Import profile (one-time)
- Settings: check "Use this connection string at runtime..."
- Settings: check "Execute Code First Migrations"
- Publish
- Azure, restart website