In my first post on RIA and Azure, I showed how to create and modify a RIA business application to run on Windows Azure. In this post, I will cover roughly the same thing but I’ll adjust some of the steps to get the application running using both Windows and SQL Azure.
If you want to create a RIA Services business application that uses the default authentication, you’ll need to configure your SQL Azure databases for ASP.NET membership, roles, and profiles. The instructions on how to do this are detailed in this KB article. Jim has also provided some great tips for running the scripts.
The scripts you’ll need to run are all found in the ‘InstallAspSchema’ download. In the default case, you’ll only need to run the following scripts.
These steps show how to create a business application project targeted at the cloud and ready for local development. Steps 2 and 3 can also be followed to modify a preexisting business application for the cloud. This section is the same as the one from the previous post.
At this point, you should be able to run the application in the Azure development fabric. To prepare the application to run in the cloud, there are only a couple other updates that must be made.
The easiest way to do this is to update the “LocalSqlServer” connection string used by the default providers. For the connection string, just use the value available on the SQL Azure Database Summary page (I’ve added whitespace below for readability).
connectionString="Server=tcp:servername.database.windows.net; Database=aspnetdb; User ID=username@servername; Password=myPassword; Trusted_Connection=False; Encrypt=True;"
At this point you should be able to deploy your business application to Windows Azure and have the default authentication run against the database you created on SQL Azure.