You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/app-service-web-tutorial-dotnet-sqldatabase.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The sample project contains a basic [ASP.NET MVC](https://www.asp.net/mvc) creat
41
41
42
42
1. Open the extracted *dotnet-sqldb-tutorial-master/DotNetAppSqlDb.sln* file in Visual Studio.
43
43
44
-
1. Press `F5` to run the app and open it in your default browser.
44
+
1. Press **F5** to run the app and open it in your default browser.
45
45
46
46
> [!NOTE]
47
47
> If necessary, [install any missing NuGet packages](/nuget/consume-packages/install-use-packages-visual-studio).
@@ -142,17 +142,21 @@ Before you can create a database, you need a [logical SQL server](/azure/azure-s
142
142
143
143
### Connect the database
144
144
145
-
The app uses a database context to connect with the database. The database context in this sample is a connection string named `MyDbConnection`.
146
-
147
-
The connection string is set in the *Web.config* file and referenced in the *Models/MyDatabaseContext.cs* file. The Azure app uses the connection string name to connect to the Azure SQL database.
145
+
The app uses a database context to connect with the database. The database context in this sample is a connection string named `MyDbConnection`. The connection string is set in the *Web.config* file and referenced in the *Models/MyDatabaseContext.cs* file. The Azure app uses the connection string name to connect to the Azure SQL database.
148
146
149
147
1. When the database resources are created, select **Next**.
150
148
149
+

150
+
151
151
1. Under **Connection string name**, enter the name of the connection string referenced in *Models/MyDatabaseContext.cs*, in this case *MyDbConnection*.
152
152
153
153
> [!NOTE]
154
154
> If you see **Local user secrets files** instead, make sure you used the **Publish** page, not the **Connected Services** page, to configure SQL Database.
155
155
156
+
Your app is connected to Azure SQL Database using Managed Identity for Azure services, a secure method of connecting your app to your Azure resources that doesn't use secrets or passwords.
157
+
158
+
Note the message that you need to set the appropriate permissions on the SQL user corresponding with this managed identity for the connection to work. For more information, see [Grant permissions to managed identity](tutorial-connect-msi-sql-database.md#grant-permissions-to-managed-identity).
159
+
156
160
1. Select **Additional settings**, make sure **Azure App Settings** is selected, and select **Finish**.
0 commit comments