Having a ASP.NET webforms application, I use aspnetdb database created in the SQL server.
When migrating to Azure, is there any way to replace the aspnetdb database by something else so that it would not eat one database from the Azure SQL Database component? Or is the specific database supported somehow as the part of the App Services (Azure component)?
What is the typical replacement of the form of the aspnetdb datababase when working with Azure App Services?
Update: In the original application, I am using two databases in MS SQL Standard Ed. -- typically like company_users (this is the name for the aspnetdb) and company_app for the application tables. I usually create the company_users via a small external application that creates the database, the roles, and also the initial users -- see the shortened code below.
So, it probably would be more straightforward to migrate the two databases to Azure SQL Database, and to use it the same way. On the other hand, one have to pay for the Azure SQL based on the number of databases. While it is fine for the company_app, the company_users is rather small and probably worth to be replaced by something cheaper. This is the motivation for replacing the one for authentication/authorization part of the framework (aspnetdb alias company_users) by something else that would not eat one SQL database.
The shortened source code of my InitUsers.exe:
// ... get the configuration information to be used for...
SqlServices.Install(SQLServerName,
SQLServerUser, SQLServerPassword,
ASPNETdbName, SqlFeatures.All);
// ... and the roles in the loop...
SqlRoleProvider roleProvider = AModule.GetRoleProvider();
string[] roles = { "admin", "poweruser", /* ... */ };
foreach (var role in roles) {
if (!roleProvider.RoleExists(role))
roleProvider.CreateRole(role);
}
// ... and the initial users...
List<string[]> userList = new List<string[]> {
// 0 1 2 3 4 5 6
// login, email, roles, first, last tit., phone
new[] { "nemo", "[email protected]", "admin", "Nihil", "Nemo", "cpt.", "123 456 789"}
};
foreach (var info in userList) {
string login = info[0];
string password = ...;
string email = info[1];
string[] rolenames = info[2].Split();
string first = info[3];
string last = info[4];
string title = info[5];
string phone = info[6];
AModule.MakeUser(login, password, email, rolenames,
first, last, title, phone,
true); // isApproved
}