Registering ASP.net Membership, Roles, Personalization and Health Monitoring in Windows Azure

While attempting to setup the ASP.net membership provider with the newly updated Windows Azure, I logically assumed I could use the default aspnet_regsql.exe console utility to specify my connection details to setup my Azure SQL database.   Once I ran this utility, I ran into an error message:

Commands failed:

USE [MyDatabase]

SQL Exception:
System.Data.SqlClient.SqlException: USE statement is not supported to switch between databases. Use a new connection to connect to a different Database.

After some research, I landed on this support article which indicates there are new SQL scripts specific to Windows SQL Azure.  Clicking this link, I was able to download aspnet_regsqlazure.zip and use it in exactly the same manner as I was able to use aspnet_regsql.exe.   Hope this helps.

 

Kyle Ballard

Kyle is a software developer with 15+ years of experience and holds Microsoft and Salesforce developer certifications. He is also a spouse, father, aspiring home chef, and technology enthusiast.