The web app name is used as part of the default URL for your app (. You can keep the generated web app name, or change it to another unique name (valid characters are a-z, 0-9, and -). In the App Service instances pane, click +. If the signed-in Microsoft account doesn't have your Azure subscription, click it to add the correct account. If you're already signed into a Microsoft account, make sure that account holds your Azure subscription. Make sure that Azure App Service (Windows) is selected and click Next. Select Azure as your target and click Next. In the Solution Explorer, right-click your DotNetAppSqlDb project and select Publish. The connection string name is used later in the tutorial to connect the Azure app to an Azure SQL Database. The connection string is set in the Web.config file and referenced in the Models/MyDatabaseContext.cs file. In this sample, the database context uses a connection string named MyDbConnection. The app uses a database context to connect with the database. Test the Edit, Details, and Delete links. Select the Create New link and create a couple to-do items. The app is displayed in your default browser. Type Ctrl+F5 to run the app without debugging. Open the dotnet-sqldb-tutorial-master/DotNetAppSqlDb.sln file in Visual Studio. The sample project contains a basic ASP.NET MVC create-read-update-delete (CRUD) app using Entity Framework Code First. Download the sampleĮxtract (unzip) the dotnet-sqldb-tutorial-master.zip file. If you've installed Visual Studio already, add the workloads in Visual Studio by clicking Tools > Get Tools and Features.
#Asp.net mvc sql server connection string install
Install Visual Studio 2022 with the ASP.NET and web development workload. If you don't have an Azure subscription, create a free account before you begin.
#Asp.net mvc sql server connection string update