Search code examples
c#asp.netazureauthenticationuser-registration

Use default (built-in) asp.net user registration and login in deployed azure website with my own database


Is it possible to use the default asp.net user registration in my deployed website in azure? Also I want to use my own database with it, not the default MSSQLLocalDB - Filename.mdf file.


Solution

  • Yes, you can do this. The connection strings are overwritten by the Data Connections when you deploy your code. Create a SQL Server (logical server) resource, then create a database. Finally, go to App Service and use Data Connections to link the database to your App Service. Most important - make sure the connection string name is the same as your app expects. Once that has done (and potentially after a restart of the service), you should be up and running with the data stored in SQL Azure.